Difference between revisions of "LlGetNextEmail"

From Second Life Wiki
Jump to navigation Jump to search
(Changing the tense, passed tense is awkward.)
m
 
(One intermediate revision by one other user not shown)
Line 17: Line 17:
|constants
|constants
|examples=
|examples=
<lsl>
<source lang="lsl2">
default {
default
     state_entry() {
{
         llSetTimerEvent(1.0); //Don't go much lower than this...
     state_entry()
    {
         llOwnerSay("My email address is: " + (string)llGetKey() + "@lsl.secondlife.com");
 
        // check every half minute
        llSetTimerEvent(30.0);
     }
     }
   
     timer() {
     timer()
         llGetNextEmail("", ""); //Check for emails
    {
    }
         //Check for emails
   
        llGetNextEmail("", "");
    email(string time, string address, string subj, string message, integer num_left) {
   
        llOwnerSay("I got an email: " + subj + "\n" + message);
     
     }
     }
    email(string time, string address, string subj, string message, integer num_left)
    {
          llOwnerSay("I got an email: " + subj + "\n" + message);
    }
}
}
</lsl>
</source>
|helpers
|helpers
|also_functions={{LSL DefineRow||[[llEmail]]}}
|also_functions={{LSL DefineRow||[[llEmail]]}}

Latest revision as of 02:15, 22 January 2015

Summary

Function: llGetNextEmail( string address, string subject );

Get the next queued email that comes from address, with specified subject.

• string address Sender's mail address
• string subject Mail subject

If address or subject an empty string, then that parameter will be treated as a wildcard.

Specification

The email event will be triggered only if address and subject match

  • Neither parameter is case sensitive.
  • If a parameter is an empty string, then that parameter will be treated as a wildcard, matches anything.
  • If both parameters are empty strings then the first email in the queue will be matched.
  • The email queue is FIFO.

Examples

default
{
    state_entry()
    {
        llOwnerSay("My email address is: " + (string)llGetKey() + "@lsl.secondlife.com");

        // check every half minute
        llSetTimerEvent(30.0);
    }
 
    timer()
    {
        //Check for emails
        llGetNextEmail("", "");
    }
 
    email(string time, string address, string subj, string message, integer num_left)
    {
          llOwnerSay("I got an email: " + subj + "\n" + message);
     }
}

See Also

Events

•  email

Functions

•  llEmail

Deep Notes

Search JIRA for related Issues

Signature

function void llGetNextEmail( string address, string subject );