Shihan Feiri Posted June 22, 2011 Share Posted June 22, 2011 Pls help me to corect format this script. I am trying to get mail whitout header Local-Position: xyRegion: xyObject-Name: xy string address = "xxx@xy.com"; string subject = "subject"; string message =""; default { touch_start(integer total_number) { llSay(0, "Tipe your mail in chat "); llListen(0, "", "", ""); } listen(integer channel, string name, key id, string msg) { message = llDeleteSubString(message, 0, llSubStringIndex(message, "/n/n") + 1); llEmail(address, subject, message); llSay(0,"Your mail is sent - sample"); } } With this I am not shure where comes actualy msg Link to comment Share on other sites More sharing options...
Darkie Minotaur Posted June 22, 2011 Share Posted June 22, 2011 It seems to me that you're confusing sending a mail and receiving a mail. The script you posted sends one - on the receiving side you will get region, position ... in the message body - and it's there where you use the message = llDeleteSubString(message, 0, llSubStringIndex(message, "/n/n") + 1); to get the actual message. so - the sending script would be: string address = "xxx@xy.com"; string subject = "subject"; default { touch_start(integer total_number) { llSay(0, "Tipe your mail in chat "); llListen(0, "", "", ""); } listen(integer channel, string name, key id, string msg) { llEmail(address, subject, msg); llSay(0,"Your mail is sent - sample"); } } Ther receiving side could be: default { state_entry() { llSetTimerEvent(5.0); } timer() { llGetNextEmail("", ""); } email( string time, string address, string subject, string message, integer num_left ) { if (llGetSubString(address, -19, -1) == "@lsl.secondlife.com") {//Message was sent from within SL. For this example we will just strip the header. message = llDeleteSubString(message, 0, llSubStringIndex(message, "\n\n") + 1); } llSay(0, message); if(num_left) llGetNextEmail("", ""); } } I actually stole that from the wiki Link to comment Share on other sites More sharing options...
Shihan Feiri Posted June 22, 2011 Author Share Posted June 22, 2011 Yes i know, but i need that msg that i send on eg. mine mail address dont have default part in body ( Object-Name: xy + Region: xy + Local-Position: xy ) I need that only mine msg is reciving. I wish to post message on twitter via mail from inworld , and with content of object, location etc- i dont have any space for rest of msg Link to comment Share on other sites More sharing options...
Darkie Minotaur Posted June 22, 2011 Share Posted June 22, 2011 ahh - you want to send the mail body without the prefixed information - that is not possible. You have to deal with that on the receiving side. Link to comment Share on other sites More sharing options...
Shihan Feiri Posted June 22, 2011 Author Share Posted June 22, 2011 Now I have cheat. Mybe in body is this header- but subject is clean. Thanks on help. You have save mine time on trying to format msg Link to comment Share on other sites More sharing options...
Recommended Posts
Please take a moment to consider if this thread is worth bumping.
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now