Last Updated: February 25, 2016
·
537
· bjcohen

Easy SMTP Debugging Server

Sometimes I want to debug a script that's sending emails, and I always wanted to know if there was an easy way to spin up an SMTP server.

It turns out the smtpd module that comes with Python has a mode that will dump any emails it's sent to stdout:

python -m smtpd -n -cDebuggingServer