tags:

views:

110

answers:

3

Could you please suggest a simple SMTP server with the very basic APIs(by very basic I mean, to read,write,delete email) that could be run on a linux box? I just need to convert the crux of the email into XML format and FTP it to another machine.

A: 

There is Python SMTP server.

zoli2k
Yes,I know.But,I'm unable to figure out how to read email with that lib!A way round this problem, perhaps?
fixxxer
+2  A: 

There are really 2 things required to send an email:

  • An SMTP Server - This can either be the Python SMTP Server or you can use GMail or your ISP's server. Chances are you don't need to run your own.
  • An SMTP Library - Something that will send an email request to the SMTP server. Python ships with a library called smtplib that can do that for you. There is tons of information on how to use it here: http://docs.python.org/library/smtplib.html

For reading, there are two options depending on what server you are reading the email from.

Chris Dail
+1  A: 

Take a look at this SMTP sink server

It uses smtpd.SMTPServer to dump emails to files.

hasen j
THIS is awesome!
fixxxer