SMTP mailsink - route all SMTP email to a file

Adam Feuer adamfeuer at gmail.com
Thu Oct 13 02:48:59 CEST 2005


Folks,

This little class starts up an SMTP server which acts as an email
sink, collecting all received emails destined for any address. All
emails are routed to a Portable Unix Mailbox file. This is very handy
for testing applications that send email. It runs in its own thread,
so you can easily use it from a test fixture to collect your emails
and verify them for correctness.

http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/440690

Enjoy!

-adam

--
Adam Feuer <adam at adamfeuer dot com>


More information about the Python-announce-list mailing list