Difference between revisions of "LlGetNextEmail"

From Second Life Wiki
Jump to navigation Jump to search
m (set highlighting just to variable specified above)
m
 
(11 intermediate revisions by 5 users not shown)
Line 2: Line 2:
|func_id=120|func_sleep=0.0|func_energy=10.0
|func_id=120|func_sleep=0.0|func_energy=10.0
|sort=GetNextEmail
|sort=GetNextEmail
|func=llGetNextEmail|p1_type=string|p1_name=address|p2_type=string|p2_name=subject
|func=llGetNextEmail
|func_footnote
|p1_type=string|p1_name=address|p1_desc=Sender's mail address
|func_desc=Get the next waiting {{LSLG|email}} with appropriate sender '''address''' and/or '''subject''' (if {{HoverText|blank|an empty string: {{String}}}} they are ignored)
|p2_type=string|p2_name=subject|p2_desc=Mail subject
|func_footnote=If '''address''' or '''subject''' an {{HoverText|empty string|{{String}}}}, then that parameter will be treated as a {{HoverText|wildcard|wildcard in this context means it will matches anything/everything}}.
|func_desc=Get the next queued [[email]] that comes from '''address''', with specified '''subject'''.
|return_text
|return_text
|spec
|spec=
|caveats
The [[email]] [[event]] will be triggered only if '''address''' and '''subject''' match
*Neither parameter is case sensitive.
*If a parameter is an {{HoverText|empty string|{{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 {{HoverText|FIFO|First In First Out - The first item put into the queue is the first one out of the queue}}.
|caveats=
|constants
|constants
|examples=
|examples=
<lsl>
<source lang="lsl2">
default {
default
     state_entry() {
{
         llSetTimerEvent(1); //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
|also_functions={{LSL DefineRow||[[llEmail]]}}
|also_events=*{{LSLG|email}}
|also_events={{LSL DefineRow||[[email]]}}
|also_tests
|also_tests
|also_articles
|also_articles

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