Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

EMAIL from RL

audio Zenith
Registered User
Join date: 18 May 2006
Posts: 16
07-07-2006 01:46
I have now got the in-world script to RL life working, and I was wondering is the other way was possible.

Anyone working on sending an e-mail to an avatar from RL to SL?

No doubt this would raise some "open" issue, and potentially lead to the hideous spam?
_____________________
Adriana Caligari
Registered User
Join date: 21 Apr 2005
Posts: 458
07-07-2006 03:24
You cannot email an avatar directly - you have to email an object which can then process the mail and tell an avatar about it.

Replying via email to IM's from in-world sends an email directly to a "session id" ( for want of a better phrase ) which is temporary and changes each time you log in.


The way most do it is to create a HUD or attachement that the avatar wears which processes emails to and from RL ( or even a base station which can IM the avatar when email arrives ).
_____________________
Maker of quality Gadgets
Caligari Designs Store
audio Zenith
Registered User
Join date: 18 May 2006
Posts: 16
Script
07-07-2006 05:27
Do you happen to know where such a script can be found?
_____________________
Adriana Caligari
Registered User
Join date: 21 Apr 2005
Posts: 458
07-07-2006 05:48
CODE

string address = "mymail@mail.com";
integer channel = 9;
integer lkey;

init()
{
llOwnerSay ( "Sending outbound email with return address" ) ;
llEmail( address,"Address in SL ",(string)llGetKey() + "@lsl.secondlife.com" );
llOwnerSay ( "EMail sent - you may send another by typing on channel " + (string)channel );
llSetTimerEvent( 30 ) ; // check email every 30 seconds
lkey = llListen(channel,"",llGetOwner(),"" );
}
default
{
state_entry()
{
init();
}
on_rez( integer r )
{
init();
}
changed( integer c )
{
if ( c & CHANGED_OWNER )
{
llResetScript();
}
}
listen( integer ch, string nm, key id, string mess )รน
{
llOwnerSay ("Sending");
llEmail( address,"message from sl",mess );
llOwnerSay ("Sent");
}
email( string mtime, string madress,string msubject,string mbody,integer num_left )
{
llOwnerSay ( "email received @" + mtime );
llOwnerSay ( "Address :" + maddress );
llOwnerSay ( "Subject :" + msubject ) ;
llOwnerSay ( "Body :" + mbody )
if ( num_left > 0 )
{
llGetNextEmail( "","" );
}
}
timer()
{
llGetNextEmail( "","" );
}
}


That should work - uncompiled so prob has syntaxes

Really basic - sends out an email to RL telling you the return address

Anytime it gets an email it will show it to you

Say anything on the chosen channel it sends an email
_____________________
Maker of quality Gadgets
Caligari Designs Store