Jump to content

Empty emails sent by llEmail( )


Domitan Redenblack
 Share

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

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

Recommended Posts

The code below always sends an empty email to me, although checking the gsAgentHistory just before Noon London time shows visitors in the list. Something is emptying the list BEFORE the email is sent.

Any ideas?



timer ( ) { myCheckAgents( ); // Updates visitor list if (gsCurHour == "12" && gsPrevHour != "12" ) {// report London Noon daily = SLT 4am gsPrevHour = gsCurHour; // due to 20 sec delay of email, remember we are sending one llEmail( "virtualvisitor99@gmail.com", "Domaine visitors", "Noon report:\n" + gsAgentHistory ); gsAgentHistory = ""; } gsPrevHour = gsCurHour; }

 

Link to comment
Share on other sites

Adding two llOwnerSays like this

timer ( ) {
    myCheckAgents( ); // Updates visitor list

    if (gsCurHour == "12" && gsPrevHour != "12" ) {// report London Noon daily = SLT 4am
        gsPrevHour = gsCurHour; // due to 20 sec delay of email, remember we are sending one
        llOwnerSay( gsAgentHistory );
        llEmail( "virtualvisitor99@gmail.com", "Domaine visitors",
            "Noon report:\n" + gsAgentHistory );
        llOwnerSay( gsAgentHistory );
        gsAgentHistory = "";
    }
    gsPrevHour = gsCurHour;
}

 tells what?

Link to comment
Share on other sites

if ..gsAgentHistory...is a list...then you mebbe could change a few things?

 

you could cast the list to a string..

string Visitors = (string)gsAgentHistory;

and then do

"Noon report : \n" + Visitors);

or try...

 

"Noon report:\n" + (string) gsAgentHistory );



 gsAgentHistory = [];
Link to comment
Share on other sites

I have not had any further trouble, but I did note that the string max length for emails from SL is about 3,600 bytes. It could be that I was exceeding this limit.

I would have thought that SL would just truncate the message to 3,600 bytes plus headers etc, but perhaps not.

I will keep a closer watch on this. If the whole message is truncated when it exceeds 3,600 bytes, that's not good.

 

 

Link to comment
Share on other sites


Innula Zenovka wrote: According to the wiki article on

The entire message (including the address, subject and other miscellaneous fields) can't be longer than 4096 bytes combined.



Yes, but there is no information on what happens if the message is longer than that. Other functions specify the string will be truncated. This article does not say.

 

Truncated to 4096 is fine. Deleted is not.

 

Link to comment
Share on other sites

Truncating could have the effect of sending your what appears to be an empty message, though.  Try including this snippet from the llEmail wiki page to get rid of a really long header and leave more room for the message itself:

email( string time, string address, string subj, string message, integer num_left ){    if(llGetSubString(address, -19, -1) == "@lsl.secondlife.com")//trim the header        message = llDeleteSubString(message, 0, llSubStringIndex(message, "\n\n") + 1);}
Link to comment
Share on other sites

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

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
 Share

×
×
  • Create New...