Change font size
It is currently Sat Dec 15, 2018 1:23 pm

Forum rules


{L_IMAGE}



Post a new topicPost a reply Page 1 of 1   [ 8 posts ]
Author Message
 Post subject: Click Prim to send Email
PostPosted: Wed Dec 10, 2008 6:39 pm 
Site Admin
User avatar

Joined: Sat Feb 02, 2008 5:27 pm
Posts: 843
I have just begun testing the smtp module for opensim, you can find details here on how to enable smtp for your simulator and get "llEmail" working for you:

SMTP Section (Experimental) This section is used if you want your region can use llEmail (experimental) function. To enable the function you must enabled the module in [Startup] section of your OpenSim.ini:

[Startup]
emailmodule = DefaultEmailModule

and then:

[SMTP]
enabled = true
host_domain_header_from = <domain name of grid or server, e.g. opensimulator.org, osgrid.org>
SMTP_SERVER_HOSTNAME = <smtp server>
SMTP_SERVER_PORT = <port number>
SMTP_SERVER_LOGIN = <login for smtp server>
SMTP_SERVER_PASSWORD = <password for smtp server>

once you get SMTP setup the following script will send you an email to your email address when the prim is clicked. This is very rough use of email, mostly just an example of what can be done.

{L_CODE}:
string email_address = "user@email.com"; // who will receive the messages
string hname = "User Name"; // name that will be displayed in hover text as receiver of mail
string date;
string name;
string sim;
default
{
    state_entry() {

        //Send an email to a normal email account
        llSetText("click to send " + hname + " an email",<1,1,1>,1);
        llEmail( email_address, "Initializing Email Module", "[STARTUP COMPLETE]");
    }

    touch_start( integer num_detected ) {
        integer i = 0;
        date = llGetDate();
        name = llDetectedName(i);
        sim = llGetRegionName();

        // Send another email, telling who touched the prim.
        do
            llEmail( email_address, "Prim Touched", "I was touched by: " + llDetectedName(i) + "\nKey: " + (string) llDetectedKey(i) + "\n On the Following Date: " + date);
        while(++i < num_detected);
        llSay(0,"------------------------>");
        llSay(0,"Em@il sent from " + name + "@" + sim + ".osgrid.org");
        llSay(0,"------------------------>");
        llPlaySound("Boing", 1.0);
    }
}


version 0.3 (12/10/2008)


Top
 Profile  
 
 Post subject: Re: Click Prim to send Email
PostPosted: Wed Dec 10, 2008 8:38 pm 

Joined: Fri Dec 05, 2008 1:41 pm
Posts: 22
Hi, this dont have a Spamm risk?
i mean can i make spamm clicking again and again?


Top
 Profile  
 
 Post subject: Re: Click Prim to send Email
PostPosted: Wed Dec 10, 2008 8:46 pm 
Site Admin
User avatar

Joined: Sat Feb 02, 2008 5:27 pm
Posts: 843
yes there is no limit to how many times someone could click this particular prim, SMTP should only be enabled if your able to control whats going on in the sim currently, i do not recommend turning it on if your going to leave your sim wide open for everyone to use.


Top
 Profile  
 
 Post subject: Re: Click Prim to send Email
PostPosted: Thu Dec 11, 2008 7:04 pm 
OSG Elite
User avatar

Joined: Wed Nov 19, 2008 6:22 pm
Posts: 592
thanks for the basic SMTP-seeting...

easy going, works fine.

i just have no clue about the way back...

wouldn´t that need a "accept all" mailbox, that is handeld by a central SMTP-services ?

like a worker thread crawling this mailbox for valid messages, returning the rest ?


cheers
Ralf

_________________
visit me:

osgrid: Sharkland Tropical 1 SL: Great white shark

German opensim HowTo: http://www.ralf-haifisch.biz/Opensim%20HowTo.shtml
Mapxing - 3D web magazine devotet to opensource: http://opensim.maxping.org/


Top
 Profile  
 
 Post subject: Re: Click Prim to send Email
PostPosted: Thu Dec 11, 2008 8:32 pm 
Site Admin
User avatar

Joined: Sat Feb 02, 2008 5:27 pm
Posts: 843
yea right now its outbound only, Fly-Man expressed some interest in trying to make things work both ways, but i think there are some security issues that probably need working out still.

Neb :ugeek:


Top
 Profile  
 
 Post subject: Re: Click Prim to send Email
PostPosted: Fri Dec 12, 2008 8:15 pm 

Joined: Fri Dec 05, 2008 1:41 pm
Posts: 22
Some attacker can Blacklist your Server on the RBL's, and you can not be able to send emails trought the server.


Top
 Profile  
 
 Post subject: Re: Click Prim to send Email
PostPosted: Sat Dec 13, 2008 8:31 am 
OSG Elite
User avatar

Joined: Wed Nov 19, 2008 6:22 pm
Posts: 592
well...

i well never ever use my RL emailserver for my osgird experiemental-things.

whis is alpha software on a deregulated grid.

use a seperated server instead , then its no prob at all.


cheers
Ralf

_________________
visit me:

osgrid: Sharkland Tropical 1 SL: Great white shark

German opensim HowTo: http://www.ralf-haifisch.biz/Opensim%20HowTo.shtml
Mapxing - 3D web magazine devotet to opensource: http://opensim.maxping.org/


Top
 Profile  
 
 Post subject: Re: Click Prim to send Email
PostPosted: Mon May 11, 2009 8:29 am 

Joined: Tue Feb 24, 2009 5:13 am
Posts: 12
Hei

I just tried to configure the email-scripting, but there occours an error in the Opensimserver-console:

{L_CODE}:
DefaultEmailModule Exception: Unrecognized authentication type


my script is the following:
{L_CODE}:
   
    string address = "xxx@xxx.com"; 
    string subject = "Testmal von Opensim";   
    string message = "Dies ist eine Testmail von hier";

default
{
    state_entry()
    {
        llSay(0, "Script running");
        llSetText("Touch to send Email to "+address, <1.0, 1.0, 1.0>, 1.0);
    }

    touch_start(integer num)
    {
        llEmail( address, subject, message );
        llSay(0, "Email sent");
    }

}


and I enterted the values for the SMTP server in the OpenSim.ini.

{L_CODE}:
[SMTP]
    ;enabled=false
    enabled=true
    internal_object_host=lsl.opensim.local
    host_domain_header_from=127.0.0.1
    SMTP_SERVER_HOSTNAME=mail.xxx.com
    SMTP_SERVER_PORT=25
    SMTP_SERVER_LOGIN=name
    SMTP_SERVER_PASSWORD=pw


I also enabled the module, and it gets loaded.

Anybody knows, what this exception means?
Are there any mistakes?
Waht do i have to do to get it working?

thx


Top
 Profile  
 
Display posts from previous:  Sort by  
Post a new topicPost a reply Page 1 of 1   [ 8 posts ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  


Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
610nm Style by Daniel St. Jules of Gamexe.net