Jump to content

Help with mail


Shihan Feiri
 Share

You are about to reply to a thread that has been inactive for 4124 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

Pls help me to corect format this script. I am trying to get mail whitout header 

Local-Position: xy

Region: xy

Object-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

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

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

You are about to reply to a thread that has been inactive for 4124 days.

Please take a moment to consider if this thread is worth bumping.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...