Don't click here unless you want to be banned.

LSL Wiki : llEmail

HomePage :: PageIndex :: RecentChanges :: RecentlyCommented :: UserSettings :: You are
llEmail(string address, string subject, string message)

Sends email to address with the specified subject and with message in the body.

These emails will always have the sender [key] where [key] is the asset-ID of the prim containing the script sending the email (see llGetKey). Example sender: Emails sent to such an address can be read using llGetNextEmail.

The length of the entire email is limited to 4096 characters, including the subject, message, and other headers (such as address), as well as CR + LF and the prepended lines to the body.

In the message, the "\n" escape sequence is translated into "\r\n" (CR + LF) in order to generate RFC 2821 compatible line terminators. If you don't include them yourself, such a line terminator is automatically inserted after every 998 (exact number) characters (as required by the SMTP standard). Do note the email event has its own restrictions.

As of 1.6.10 - The entire email message, including headers (email, subject, etc) and message (including the pre-pended text) is 4096. Thus, the message length can only be 4096 - <headers/subject> - <prepended text>

After sending the email, this function delays the script for 20 seconds.

Unlike IM sessions with people, there is no need to first send a message before being able to receive one. Note that agents who send you an IM while you're offline have a sender of [session]

Note that scripts compiled prior to 1.3.5 must be recompiled, as older scripts were compiled with a bug that caused the the "\n" escape sequence to be incorrectly translated to CR (^M) instead of CR + LF (^M^J) as required by RFC 822 (and its successor RFC 2822). This bug is now fixed.

The message body will always have four lines prepended before your actual message, containing the object name, the region name and grid location, the object's position in region coordinates and an empty line before message.

Email example:
Object-Name: Object
Region: Gibson (254976, 256000)
Local-Position: (117, 129, 50)

The real message starts here.

For an example of llEmail in action, see the email entry.

Q: What is the range of IP addresses I need to open up on my server to be able to receive email from SL?
A: The following netblocks:

Q: What is the best way to cut out the headers in LSL if another object is receiving this email, and we only want the message?
A: Can't say if it's the best way, but I use:
string MessageWithoutHeaders = llDeleteSubString(OriginalMessage, 0, llSubStringIndex(OriginalMessage, "\n\n") + 1)

Q: How many emails can you send before LL decides you've sent enough and blocks it?
A: It's more a volume issue >.> one of our heightmapper URL domains got killed when I had rezzed about... 15 heightmappers... LL determined it was an attack and quietly blackholed the e-mail address, I never heard back, and since designed my system to not be near as bad, but it's slow now >.< -- Ice
-- Well, I think it is between 50 - 100 emails / min before they do something like that.. I had something similar that sent around 120 emails / min and I was fine, but they where small, around 200 characters. Alpha
Data in this A has to be out of date... throttling seems to be handled by the server itself as of 1.6, as the high volume mailer I have would just stop recieving e-mails from the sim at one point, further tests are needed. - Ice
-- It is, there has been changes in the email system recently through my experiments. Through a linden, I was able to understand that the limit is 1 email / second for an extended amount of time. You will then be throttled until the day's email rate for you has slowed down to that rate, thus, at 12:00 AM PST, the throttling list is cleared out. This amount of time is yet unknown, but it seems to be proportional to the rate. Ex: If you send an email every 10th of a second, you will be throttled faster than if you sent every half second. Emails are throttled by the hostname of the destination server, not the domain as many believed in the past. If the email is sent from an object in SL to another object in SL, the sender's key is throttled. I have to still do some more experiments to conclude this result. If the version is 1.9.1 or later, use llHTTPRequest instead, it is much faster and can send up to the script's memory in data at once. -- Alpha

Q: How do I CC: an email to multiple recipients?
A: Despite being part of the email standard, you can't. Use multiple llEmail calls. (Note: llMessageLinked may come in handy here.)

1.6 Released the other day to find some unsuspecting results with llEmail. If no subject is used(empty string), the email will not send. this can be fixed with a simple space as the subject. Those that rely on emails with no subjects might need to do some script revision ~_< -MingChen

LindenLab uses PostFix.

Kelly Linden explains on the secondlifescripters mailing list:
Actually yes. We cheat for object -> object email. There are three
distinct cases:
1) Obj <--> Obj both in the same region: We really short cut. The
message never hits the network or leaves the sim process. This isn't
too bad.
2) Obj <--> Obj with objects in different regions: Somewhat shortcut, we
send the email directly to the other region. It never actually becomes
an email but still requires the object presence lookups etc.
3) Outside <--> Obj: Real email going through real email layers
including the central email gateway and the outside world.

- Kelly

Compare with llGetNextEmail.

This article wasn't helpful for you? Maybe the related article at the LSL Portal is able to bring enlightenment.

Functions | Communications
There are 7 comments on this page. [Display comments/form]