views:

65

answers:

4

Is there any widget, or similar, that i could use to send an email for me?

Something like i pass a post in some pre-defined way, this server would get it, parse it and send it to some email for me?

More of a curiosity than a valid question itself...

+1  A: 

Yes; it's called a server-side script.
You can do it in a couple of lines of ASP.Net. (See the SmtpClient class)

It's also called an open relay; you'll need some way to prevent it from being used by spammers.

SLaks
Thank you slaks. I am quite aware of that. I am in search of something else, but as Pekka said, probably would be misused in some way by spammers...
NoProblemBabe
+2  A: 

Hardly in a public way, as it would most certainly be misused by spammers within a day or two.

You can set something like it up easily using a scripting language like PHP on an own server.

Pekka
Real problem would be that i don't have all information on this server, as its a surprise present to a friend of mine, i cant ask him much about it. There are at least two options of hosting that i would swear he had got.
NoProblemBabe
+2  A: 

There's the classic formmail, a CGI script from the days of yore, which now seems to have a commercial, hosted version. Most web hosts have formmail or some variation of it installed; check the documentation for your host.

Brian Campbell
That's very nice to know... thanks a million
NoProblemBabe
A: 

You need server-side scripting for this, using a language such as Perl, PHP, Ruby, Python, any .Net language, or Java.

  1. Typically what happens is that your web page will send a POST message to your web server with the recipients, body, and perhaps attachments of the email as POST parameters.
  2. The server side script will parse the POST parameters and run a SMTP or IMAP session with your mail server to send the mail, and the script will pack the parameters from the POST message into that session with the mail server. This is the same kind of SMTP session that your mail client (e.g. Outlook, Thunderbird, Evolution,...) uses to talk to your mail server (e.g. Exchange, gmail, sympatico.ca,...).
  3. The server side script will then render a web page saying whether or not the mail succeeded.

You need to figure out what your web host offers as a server side scripting language. All of the major server-side languages have libraries that allow you to both parse parameters from POST messages and to run a session with your email server. I have personally used libraries from Perl and Ruby on Rails for both parsing and talking to mail servers, and they were straight-forward to use.

Jay Godse