Skip to content
lsl.devlsl.devLSL Dev

llGetNextEmail

function
Function syntax
llGetNextEmail(
  1. string address,// Sender email address filter, or "" for any address.
  2. string subject// Email subject filter, or "" for any subject.
);
Energy
10

Requests the next queued email via the email event. Emails must 1. Be sent to `{ll.GetKey()}@lsl.secondlife.com` 2. Be sent from the specified sender Address (or any address if blank) 3. Have the specified subject Subject (or any subject if blank)

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

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

How to use
llGetNextEmail("", "");

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.
Example 1
11 collapsed lines
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("", "");
}
5 collapsed lines
email(string time, string address, string subj, string message, integer num_left)
{
llOwnerSay("I got an email: " + subj + "\n" + message);
}
}
Original wiki source

Some wiki templates and tables need their original context. View this article on the Second Life Wiki. Technical wording and examples are retained from the source; historical guidance may differ from current behavior.

From the Second Life Wiki

Community documentation adapted from LlGetNextEmail, by Linden Research, Inc. and contributing residents.View contributors and history.

Imported wiki revision:

Licensed under CC BY-SA 3.0. Last wiki edit: .Formatting and links have been adapted for this site; API metadata follows the LSL definitions.