Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Forwarding off-world emails in-world?

Dagmar Strauss
Registered User
Join date: 21 Dec 2005
Posts: 17
04-13-2006 15:02
Has anybody here successfully managed to forward off-world emails to an in-world address?

For example, I want an object in-world to send an email to [email]server@dagmarstrauss.com[/email], and to have that address forward it to [email]a8368ca6-ef2a-f6c6-19b5-934c18420bde@lsl.secondlife.com[/email].

When i try this the direct way, however, I get Mail sys delivery emails back, stating that, even though the forward went through successfully, the server has hiccupped because the actual To: address is [email]server@dagmarstrauss.com[/email].

So I'm wondering if anyone here has ever created a successful model for sending emails off-world and then back in-world automatically.
Ordinal Malaprop
really very ordinary
Join date: 9 Sep 2005
Posts: 4,607
04-13-2006 15:08
Why not just send it to both addresses from the in-world device?
MadamG Zagato
means business
Join date: 17 Sep 2005
Posts: 1,402
04-13-2006 15:12
From: Dagmar Strauss
So I'm wondering if anyone here has ever created a successful model for sending emails off-world and then back in-world automatically.


Hi Dagmar. I do it successfully. Firstly, make sure that the address your object is sending the email to is not an alias email address. It will not work in that case. It must be an actual email account on the server.

Hope that helps,
Mad
_____________________
Dagmar Strauss
Registered User
Join date: 21 Dec 2005
Posts: 17
04-13-2006 15:14
In that case, what are you using to forward the email? Some kind of client-side filter or something?
Dagmar Strauss
Registered User
Join date: 21 Dec 2005
Posts: 17
04-13-2006 15:15
The idea, Ordinal, is not to get emails in two places, but to be able to change the forwarding settings on the off-world mail to a new address should the in-world server ever be derezzed.
Ordinal Malaprop
really very ordinary
Join date: 9 Sep 2005
Posts: 4,607
04-13-2006 15:21
From: Dagmar Strauss
The idea, Ordinal, is not to get emails in two places, but to be able to change the forwarding settings on the off-world mail to a new address should the in-world server ever be derezzed.

Well, this sounds like a problem with the forwarding on your off-world account, then. I regularly have emails sent to a Googlemail account which automatically forwards to my main address. There's not a lot one can do to change the format of emails via LSL anyway.
Dagmar Strauss
Registered User
Join date: 21 Dec 2005
Posts: 17
04-13-2006 15:24
Hmmm... I think we're having two different conversations, Ordinal. Thanks for you input, though.
MadamG Zagato
means business
Join date: 17 Sep 2005
Posts: 1,402
04-13-2006 16:09
Dagmar,

The simple way if you are using a hosting company is to use your hosting control panel/email control panel and create an account, and set it to auto-reply. For the instance I am referring to, I used HELM at that time which worked great.

In the below example, I am sending a message to an email address. The subject of the message is Test and the message is Is anyone there?

In HELM, you can set your autoresponder to send back a message instantly. So for that email account, my autoresponder's message is "Yes I am here!"

It automatically responds to that objects email and the object will whisper to me:
"Yes I am here!"
-which was the reply from the email autoresponder.


CODE


default
{
touch_start(integer total_number)
{
llEmail("youremail@yourdomain.com","Test","Is anyone there?");
llSetTimerEvent(2.5); // poll for emails
}

timer() {
llGetNextEmail("", ""); // check for email
}

email(string time, string address, string subj, string message, integer num_left) {
if(message == "Yes I am here!")
{
llWhisper(0,message);
}
if (num_left == 0) llSetTimerEvent(0.0); // stop timer when theres no more email
}
}



I hope this helps.

Warmest regards,
Mad
MadamG Zagato
means business
Join date: 17 Sep 2005
Posts: 1,402
04-13-2006 16:12
Now keep in mind also that you can send other info in your subject/message. If you are using a subject line the autoresponder that I use, it will send it back in the subject line and you can use that somehow to forward it to yet another object if neccessary. There are many possibilities. It just depends on what you are trying to accomplish.

Smiles =)
Ziggy Puff
Registered User
Join date: 15 Jul 2005
Posts: 1,143
04-13-2006 16:40
I ran into the same problem when using an auto-forwarder. SL bounced the email, because the "To" address was wrong - it was the original off-world address, even though it got forwarded to the right SL address.

I ended up using a script on my server to handle this. How you get the email to the script will probably depend on your server - I use a .forward file to send the email to procmail, then my .procmailrc file sends it to a script. The script is pretty much a copy of one of the XML-RPC scripts posted in the Wiki. I used the PHP script, and took the portion that parsed an incoming email and extracted the relevant headers and body. I then use the extracted To, Subject, and body, and create a new email and send it to the in-world address. Which, in PHP, is just one function call.

So you achieve what you're trying to do - the in-world sender only knows the one (hopefully unchanging) off-world address. The knowledge of the final in-world destination key/address is hardcoded into this script, which acts as a "smarter forwarder", I guess, if you want to view it that way.

There might be a simpler way to solve this problem, but that's what I ended up doing.

I hope that answers your question, if I correctly understood what it is you're trying to do.