Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

E-mail receipt oddities.

Jillian Callahan
Rotary-winged Neko Girl
Join date: 24 Jun 2004
Posts: 3,766
08-20-2005 05:05
I've started using a central server for my vendors - each vendor sends an e-mail to the server to request delivery of the item.

This has worked out dandy fine.

Now, I was thinking about expanding that a bit, so I rezzed up a copy of the server from inventory, set up a vendor to use *that* server instead... and got nothing.

The symptoms are odd. If I send e-mail from my personal account to the test server, the e-mail gets read about 120 seconds later than one I send to the production server. E-mail from any in-world object is typically never read at all, though once out of about every 30 times an object's mail gets read.

Code snippet:
"update()" - updated the display
"stripoff()" - removes the location etc. lines from the e-mail
"CheckInventory()" - returns true if the invenory is there.
CODE
timer()
{
llGetNextEmail("","");
}

email(string time, string address, string subj, string message, integer num_left)
{
message = stripoff(message);
llOwnerSay(message); // for Debugging
if (llMD5String(message, MDfive) == subj)
{
list buy = llParseString2List(message, ["|||"], [""]);
key delivertarget = llList2Key(buy,0);
string delivername = llList2String(buy,1);
string deliveritem = llList2String(buy,2);
if (CheckInventory(deliveritem))
{
update(delivername + " bought " + deliveritem);
llGiveInventory(delivertarget, deliveritem);
}
else
{
llOwnerSay("WARNING! Misconfigure - missing " + deliveritem + " for " + delivername);
update(delivername + " bought " + deliveritem + " ERR");
llInstantMessage(delivertarget, "There has been an error - please contact Jillian Callahan for assistance.");
}
}
else
{
update("AUTHENTICATION FAILURE");
llOwnerSay("Authentication failure");
llOwnerSay(message);
}

if ( num_left > 0 ) llGetNextEmail("","");
}


Note again, this all works fine in the other object, not two meters away...

Help?

EDIT: Oh, and I have checked to make sure the other objects can send mail. And I do have one other object recieving mail every ten seconds from four other objects in the sim.

EDIT AGAIN: Also, I deleted the test server and rezed up another... actually, did this several times. Even rezed one up, then shift-dragged to copy it, just in case. The results were the same each time.
_____________________
Blain Candour
Registered User
Join date: 17 Jun 2005
Posts: 83
08-20-2005 14:47
I use a similar system on my vendor network. I filter the emails incoming by XORed subject.

//

string filtersubject = llXorBase64Strings(llStringToBase64(request), llStringToBase64(crypt_pass));

llGetNextEmail("", filtersubject);

//

That sort of thing.


While I was originally making this part of the system I thought I had the same problem you are. I put an echo and a color change onto the email event before any logic trees to see if I was getting any email at all. It turned out to be a simple error deeper in causing it.

I can't see any problem with your code. Possibly try filtering the email and then checking to see if the object is getting any emails that way. Not to sound condescending since I know you are good at this sort of thing but if you are not getting any at all from objects but you are from personal email then you may want to recheck that your server key on the child side has no little typos or extra whitespace or anything.
_____________________
DISCLAIMER: Blain Candour is a total and eternal n00b and everything he tells you should be taken with a huge pile of salt. Especially when he refers to himself in third person!
Jillian Callahan
Rotary-winged Neko Girl
Join date: 24 Jun 2004
Posts: 3,766
08-20-2005 18:47
Thanks Blain. :)

I did check and recheck the addresses in the scripts of the sending objects, and those appeared fine. Checked to make sure the senders were actually sending by having them send to my personal account.

I did get this fixed this morning. Or at least worked around... not sure which at this point. In what was an attempt to see if it was something in the sim, I rezzed up the object on a neighbor's land in a neighboring sim. It worked fine there, and when I dragged the object back over the sim border to my land... darn thing still worked.

I don't get it >.<
_____________________
Eloise Pasteur
Curious Individual
Join date: 14 Jul 2004
Posts: 1,952
08-20-2005 19:21
Sims sometimes (for no readily obvious reason) stop sending emails I know, I was (with permission) taking an automated transcript of a conversation and got the first two and last three emails and missed about 90 minutes in the middle. Since I was sending emails every 3,500 characters or so it wasn't that heavy a load.

Never seen it the other way, but I guess that can happen too.

I think what fixed it for me was a patch. Not directly, but the sim reset.
Blain Candour
Registered User
Join date: 17 Jun 2005
Posts: 83
08-21-2005 04:54
Glad you figured it out. If I run into email retardation on my objects I will know to try rezzing them out of sim. So many bugs
_____________________
DISCLAIMER: Blain Candour is a total and eternal n00b and everything he tells you should be taken with a huge pile of salt. Especially when he refers to himself in third person!
Toneless Tomba
(Insert Witty Title Here)
Join date: 13 Oct 2004
Posts: 241
08-21-2005 09:10
I feel your pain Jill. I experienced a similar problem with my vendors but my problem failed less frequently which became a big annoyance. After alot of testing I narrowed it down to remove the location info in the message. In the LSL wiki I believe the standard is to use this:
Old Code
CODE
string MessageWithoutHeaders = llDeleteSubString(OriginalMessage, 0, llSubStringIndex(OriginalMessage, "\n\n") + 1)
For some reason some of the emails sent inworld was not reconizing "\n\n". I had to put a small character string before my info such as "@@@#!" and to filter the message from there using this:
New Code
CODE
string MessageWithoutHeaders = llDeleteSubString(OriginalMessage, 0, llSubStringIndex(OriginalMessage, "@@@#!") + 4)
Afterwards everything worked like clockwork. In my test where the old code failed it did seemed to have the "\n\n" in the email after the location but it just didn't reconize it. I can't explain why this happend but this was my experience.