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

LSL Wiki : llEmail

HomePage :: PageIndex :: RecentChanges :: RecentlyCommented :: UserSettings :: You are crawl836.us.archive.org
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]@lsl.secondlife.com where [key] is the asset-ID of the prim containing the script sending the email (see llGetKey). Example sender: a311ce4d-e755-f148-7999-56f289ca3f3b@lsl.secondlife.com. 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]@im.secondlife.com.

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:
66.150.244.0/23
69.25.104.0/23
72.5.12.0/22
-Francis


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)
-Prio


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
Comments [Hide comments/form]
Q: What's the email domain to use when using the preview grid? lsl.secondlife.com does not seem to work in the preview grid.
-- TonyTigereye (2005-05-29 19:36:16)
A: The email is simply disabled for us in the preview grid (actual preview 1.7), only lindens can use it. i know it because a linden told it to me directly on the preview
-- NonnuxWhite (2005-09-16 16:45:15)
Umm when i send a email externally to the key + lsl@secondlife.com address my object isn't receiving the email? I have tried emailling the object using 2 email addresses.
-- KairaOverdrive (2005-10-01 16:34:08)
*sighs* you going to kick your self for this.
it's
key + @lsl.secondlife.com
-- BlindWanderer (2005-10-01 21:41:37)
You also need a timer event with llGetNextEmail(,); in it.
-- DolusNaumova (2005-10-02 11:02:08)
OKay, bit stumped on this:

I want to send email from an object to a user. I don't have a way for the user to enter a contact email adress. Is there a way using their key that I can have the object use llEmail to send an email to them that will get routed to their account email (like offline IMs if they have it enabled). I'd rather not rely on the IMs to Email option being turned on and if possible would rather not have to rely on the user to put in a valid email address for contact.
-- GrazelCosmo (2005-10-19 05:21:55)
I think a better way to grab the message from the other crap LSL sends with it is to set it up as a list. Make your message, say, my message, and then parse the string to a list, skipping the first item on the list, which will be all that other garbage. This is only better, IMO, because it already sets you up to then send more complex messages if you need.
-- LucAubret (2005-11-30 14:12:00)
Attach a comment to this page: