public void llGetNextEmail(string address, string subject)
{
m_host.AddScriptLPS(1);
IEmailModule emailModule = m_ScriptEngine.World.RequestModuleInterface<IEmailModule>();
if (emailModule == null)
{
Error("llGetNextEmail", "Email module not configured");
return;
}
Email email;
email = emailModule.GetNextEmail(m_host.UUID, address, subject);
if (email == null)
return;
m_ScriptEngine.PostObjectEvent(m_host.LocalId,
new EventParams("email",
new Object[] {
new LSL_String(email.time),
new LSL_String(email.sender),
new LSL_String(email.subject),
new LSL_String(email.message),
new LSL_Integer(email.numLeft)},
new DetectParams[0]));
}