phoenix Behemoth
Registered User
Join date: 7 Oct 2004
Posts: 14
|
02-20-2005 10:56
i worked out a method in sending messages in message line instead of subject line but you loose use of subject line as i used that line to send info on the start point anyways here is the code: //Email Example //by kfir Lomax // modifyed by phoenix behemoth string eadd = "";// add email address here and it will send email to that address instead of self string message = "this is a test";// put your message here
default { state_entry() { llSetText("Touch me to send mail.",<1,1,1>,1);//Text.... }
touch_start(integer total_number) { if(llDetectedKey(0) == llGetOwner()) { vector pos = llGetPos(); string regin = llGetRegionName(); integer tota = 40 + llStringLength((string)pos) + llStringLength(regin) + llStringLength(llGetObjectName());// get start position of message llEmail(eadd,(string)tota,message);// sends email llSay(0,"Sending email..."); } } timer() { llGetNextEmail("","");//Waiting for mail from any address with any subject... } on_rez(integer start_param) { if (eadd == "") { eadd = (string)llGetKey() + "@lsl.secondlife.com";// if address is empty email to self // checks for email } llSetTimerEvent(3); } email(string time,string address,string subj,string message,integer numleft)//Email event { llSay(0,"New message recived:"); integer start = (integer)subj;// this gets number from subject to tell where message begins llSay(0,llGetSubString(message,start,llStringLength(message))); //say all stuff you will need to get rid off spaces due to forum being a pain llSay(0,"End of mail."); } }
if anyone can do better go ahead
|
Gattz Gilman
Banned from RealLife :/
Join date: 29 Feb 2004
Posts: 316
|
03-05-2005 00:26
*waves hand in the air* i do, i do 
default { state_entry() { llSetTimerEvent(2.5); }
timer() { llGetNextEmail("",""); //checks for emails } email(string time, string address, string subj, string message, integer num_left) { list lHeaders = llParseStringKeepNulls(message, ["\n"], []); //Edits outs headers string message = llList2String(lHeaders,4); //message, string that is send in the message section if( num_left == 0) //if there are no more email in queue, set the timer delay to 30sec { llSetTimerEvent(30); } else //if there are still more emails, continue at 2.5 sec intervals { llSetTimerEvent(2.5); }
}
|
Bei Shang
Registered User
Join date: 10 Mar 2005
Posts: 3
|
Original Thread:
04-18-2005 10:00
/15/17/36535/1.htmlne i am trying to turn my pc in my sl office into a super prim computer, i am gonna give this a try, i'll keep you both posted. thanks for the effort!
|
Bei Shang
Registered User
Join date: 10 Mar 2005
Posts: 3
|
04-18-2005 14:28
I tried it, but I am not getting any mail. I used the first posted code, the second drew a syntax error.
Maybe I can play around with it, is there a certian email system to use? can you use a free mail system? (hotmail or yahoo), or do you have to have a pop mail, or server side mail system?
|
Nada Epoch
The Librarian
Join date: 4 Nov 2002
Posts: 1,423
|
Discussion Thread
04-25-2005 08:17
_____________________
i've got nothing. 
|