Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Emails through OpenSim

BertronVII Hammerthall
Registered User
Join date: 27 Mar 2009
Posts: 10
03-27-2009 03:45
Hey all! I'm currently working on a virtual reality project at uni and I've come up against a rather annoying challenge which I can't seem to get my head around... I'd like to be able to send an email from my OpenSim environment. I've tried simply using the llEmail function, using my Gmail SMTP account as the middleman, but that doesn't seem to work... Ideally I'd like to be able to use the llEmail function due to it's simplicity.

Instead, I've adopted the following system:

//This is the script I'm currently using. I've written a test HTML page to called the .aspx page featured by the url parameter, that works perfectly and parses the correct parameters. However, when I parse the same information via an llHTTPRequest in OpenSim, nothing seems to happen, upon checking the HTTPResponse, (200 which is fine) I'm left a little puzzled but should let you know that I'm using IIS7.0 on Vista, I don't know if that shoots me in the fact as far as being able to talk to a .aspx page from Second Life...

default
{
touch_start(integer total_number)
{
string url =
"http://localhost/EmailPortal/default.aspx";

string formData =
"emailTo=aaa&emailFrom=bbb&emailSubject=ccc&emailBody=ddd";

llHTTPRequest(
url,
[HTTP_METHOD, "GET"],
llUnescapeURL(formData));
}

http_response(key request_id, integer status, list metadata, string body)
{
llSay(0, (string)status);
}
}

//This is the script I'd ideally like to use:

default
{
touch_start(integer total_number)
{
llEmail("aaa@bbb.com", "Subject", "Body" );
}
}

My OpenSim.ini reads:

; ##
; ## EMAIL MODULE
; ##

;emailmodule = DefaultEmailModule

[SMTP]

enabled=true

internal_object_host=lsl.opensim.local
host_domain_header_from=127.0.0.1
SMTP_SERVER_HOSTNAME=smtp.gmail.com
SMTP_SERVER_PORT=25
SMTP_SERVER_LOGIN=xyzzx@xyzzx.com
SMTP_SERVER_PASSWORD=xyzzx

Is there something I'm completely missing? There are no exceptions being thrown because successive lines of code execute fine and I don't get the red error message towards the left of my screen... I've tried uncommenting the emailmodule line, but that seems to make my OpenSim complain when it it's starting up...

I'm stumped ^_^

Any help would be GREATLY appreciated!


Rob
Pserendipity Daniels
Assume sarcasm as default
Join date: 21 Dec 2006
Posts: 8,839
03-27-2009 03:55
Is this the Friday thread?

Pep (I must be missing the joke)
_____________________
Hypocrite lecteur, — mon semblable, — mon frère!
Wandered Miles
Registered User
Join date: 9 Dec 2008
Posts: 159
03-27-2009 03:57
Wow, that's a bit technical for Resident Answers. The only thing you can find out here is what peoples favorite color is.

I suggest you ask the question in the Scripting Tips forum.

Good luck, Bertron!
Wandered Miles
Registered User
Join date: 9 Dec 2008
Posts: 159
03-27-2009 03:59
From: Pserendipity Daniels
Is this the Friday thread?

Pep (I must be missing the joke)


You wont find it in your brackets.
Pserendipity Daniels
Assume sarcasm as default
Join date: 21 Dec 2006
Posts: 8,839
03-27-2009 04:02
From: Wandered Miles
You wont find it in your brackets.
Hey, the OP had more brackets than I did!

Pep {Some were curly ones too!}
_____________________
Hypocrite lecteur, — mon semblable, — mon frère!
BertronVII Hammerthall
Registered User
Join date: 27 Mar 2009
Posts: 10
03-27-2009 04:05
Great Scott, I'm completely out of whack as far as "in" jokes go obviously! :P That you for the suggestion, I'll take my question to the scripting forum!

Even though you guys aren't technical as far as LSL goes, thank you VERY much for your quick replies, it's so refreshing!

Take care everyone


Rob
Zolen Giano
Free the Shmeats!
Join date: 31 Dec 2007
Posts: 146
03-27-2009 05:27
My ISP blocks port 25 from leaving their network.

They want you to route your email through their smtp servers.

Try using your email account on your ISP's server and see if it works.