Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

llGetNextEmail problem

Jin Takakura
Registered User
Join date: 27 Apr 2006
Posts: 11
06-03-2006 15:46
Seems like my object just isn't receiving the email that my other object sent to it. I'm just making test scripts and I'm trying to have one object send an email to another object every 10 seconds....but the receiver object isn't getting the email! Here's the code:

Transmitter Object:
CODE

default
{
state_entry()
{
llSetTimerEvent(10.0);
}

timer(){
llEmail("d1390bcb-95d6-f156-771b-e3285aca7fa0",(string)llGetPos(),(string)llGetRegionName());

llOwnerSay("Email Sent!");
}

}


Receiver Object:
CODE

default {
state_entry() {
llSetTimerEvent(10);
}

touch_start(integer param){
llOwnerSay((string)llGetKey()); //Just to find out object's key
}

timer() {
llOwnerSay("Checking email...");
llGetNextEmail("", "");
}

email(string time, string address, string subj, string message, integer num_left) {
llOwnerSay(message);
}
}




...Any ideas why it isn't working? And yes, I am sure that is the correct key for the receiver object.
Thanks!
Lazink Maeterlinck
Registered User
Join date: 8 Nov 2005
Posts: 332
06-03-2006 15:56
There aqre a few problems I see, one is that you need to add to your key string @lsl.secondlife.com. it's the email address for secondlife objects.

CODE
default
{
state_entry()
{
llSetTimerEvent(10.0);
}

timer(){
llEmail("d1390bcb-95d6-f156-771b-e3285aca7fa0@lsl.secondlife.com",(string)llGetPos(),(string)llGetRegionName());

llOwnerSay("Email Sent!");
}

}



also, there is a 20 second delay for every email sent, so the sender when sending the email will delay 20 seconds, so you won't recieve an email every 10 seconds like you would like. Reading an email, (llGetNextEmail) has no delay built in however. With the change I made for your sender, it should now send out emails to they object. Give it a try, and if any questions feel free to contact me if you have any other concerns :)
Angela Salome
Registered User
Join date: 6 Oct 2005
Posts: 224
06-03-2006 15:56
From: Jin Takakura
I'm just making test scripts and I'm trying to have one object send an email to another object every 10 seconds...


From: LSL Wiki

After sending the email, this function delays the script for 20 seconds.

You're sending too quickly, so your emails will be blocked.

From: Jin Takakura

CODE

timer(){
llEmail("d1390bcb-95d6-f156-771b-e3285aca7fa0",(string)llGetPos(),(string)llGetRegionName());

llOwnerSay("Email Sent!");
}



Send the email to the correct address:
CODE

llEmail("d1390bcb-95d6-f156-771b-e3285aca7fa0" + "@lsl.secondlife.com", (string)llGetPos(),(string)llGetRegionName());
Jin Takakura
Registered User
Join date: 27 Apr 2006
Posts: 11
06-03-2006 16:05
Oh opps! Forgot the rest of the email address!

That's odd though, I had it all correct on a previous version of the same script, but I think there was something wrong with the llSetTimerEvent that time, maybe the timer was set to quick? Anyway, I did the correction to the address and it's working now, thanks!