Difference between revisions of "LlGetNextEmail"

From Second Life Wiki
Jump to navigation Jump to search
(Add Specification section and move some notes to there.)
(Changing the tense, passed tense is awkward.)
Line 5: Line 5:
|p1_type=string|p1_name=address|p1_desc=Sender's mail address
|p1_type=string|p1_name=address|p1_desc=Sender's mail address
|p2_type=string|p2_name=subject|p2_desc=Mail subject
|p2_type=string|p2_name=subject|p2_desc=Mail subject
|func_footnote
|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 waiting email with appropriate sender address and subject.
|func_desc=Get the next queued [[email]] that comes from '''address''', with specified '''subject'''.
|return_text
|return_text
|spec=
|spec=
* If a parameter was left {{HoverText|blank|an empty string: {{String}}}}, it will be treated as a wildcard. If both parameters were not blank, both matching must be successful.
The [[email]] [[event]] will be triggered only if '''address''' and '''subject''' match
* Parameters are not case sensitive.
*Neither parameter is case sensitive.
* [[email]] [[event]] will be triggered only when the matching was successful.
*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=
|caveats=
|constants
|constants
Line 18: Line 20:
default {
default {
     state_entry() {
     state_entry() {
         llSetTimerEvent(1); //Don't go much lower than this...
         llSetTimerEvent(1.0); //Don't go much lower than this...
     }
     }
      
      

Revision as of 06:48, 14 April 2009

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

<lsl> default {

   state_entry() {
       llSetTimerEvent(1.0); //Don't go much lower than this...
   }
   
   timer() {
       llGetNextEmail("", ""); //Check for emails
   }
   
   email(string time, string address, string subj, string message, integer num_left) {
    
        llOwnerSay("I got an email: " + subj + "\n" + message);
      
   }

}

</lsl>

See Also

Events

•  email

Functions

•  llEmail

Deep Notes

Search JIRA for related Issues

Signature

function void llGetNextEmail( string address, string subject );