Difference between revisions of "LlEmail"
Jump to navigation
Jump to search
Line 33: | Line 33: | ||
|constants | |constants | ||
|examples | |examples | ||
|helpers | |helpers= | ||
<pre> | |||
email( string time, string address, string subj, string message, integer num_left ) | |||
{ | |||
if(llGetSubString(address, -19, -1) == "@lsl.secondlife.com")//trim the header | |||
message = llDeleteSubString(message, 0, llSubStringIndex(message, "\n\n") + 1); | |||
} | |||
</pre> | |||
|also_functions=*{{LSLG|llGetNextEmail}} | |also_functions=*{{LSLG|llGetNextEmail}} | ||
*{{LSLG|llMessageLinked}} | *{{LSLG|llMessageLinked}} | ||
Line 49: | Line 56: | ||
|cat3 | |cat3 | ||
|cat4 | |cat4 | ||
}} | }}{{OSWikiFeatureNav}} | ||
{{OSWikiFeatureNav}} | |||
=== Feature Design Document === | === Feature Design Document === | ||
(none) | (none) |
Revision as of 21:05, 20 May 2007
LSL Portal | Functions | Events | Types | Operators | Constants | Flow Control | Script Library | Categorized Library | Tutorials |
Summary
Function: llEmail( string address, string subject, string message );20.0 | Forced Delay |
10.0 | Energy |
Sends an email to address with subject and message.
• string | address | |||
• string | subject | |||
• string | message |
Specification
The message is prefixed with information about the prim sending the email.
Template | Example |
---|---|
Object-Name: *prim* Region: *simname* (*simpos.x*, *simpos.y*) Local-Position: (*primpos.x*, *primpos.y*, *primpos.z*) *message* |
Object-Name: Object Region: Gibson (254976, 256000) Local-Position: (117, 129, 50) The real message starts here. |
Caveats
- This function causes the script to sleep for 20.0 seconds.
- There is a limit to the number of email messages an object can send in a given amount of time.
Examples
Useful Snippets
email( string time, string address, string subj, string message, integer num_left ) { if(llGetSubString(address, -19, -1) == "@lsl.secondlife.com")//trim the header message = llDeleteSubString(message, 0, llSubStringIndex(message, "\n\n") + 1); }
Notes
- Because of the long delay on this function, it is often called from a second script triggered by link message.
- If you are sending email within Second Life, remember that the address is [key]@lsl.secondlife.com
- Which means if the key returned by llGetKey is "a2e76fcd-9360-4f6d-a924-000000000003", then it's email address is "a2e76fcd-9360-4f6d-a924-000000000003@lsl.secondlife.com".
See Also
Deep Notes
Feature Design Document
(none)
Functional Spec
(none)
Test scripts
Discussion for future improvements
(none)
Relationship to other features
List of features that need to be tested when this feature changes, and why.
IM to email - verify IM -> email still works.
Postcards - Postcards use email out?