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.
Yes,I know.But,I'm unable to figure out how to read email with that lib!A way round this problem, perhaps?
fixxxer
2010-04-22 13:12:10
+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.
- For a POP Email Server - You can use the poplib python library: http://docs.python.org/library/poplib.html
- For an IMAP Email Server - You can use the imaplib python library: http://docs.python.org/library/imaplib.html
Chris Dail
2010-04-22 13:32:24
+1
A:
Take a look at this SMTP sink server
It uses smtpd.SMTPServer
to dump emails to files.
hasen j
2010-04-22 13:35:21