Nov 16

Running a test mail server

A quick tip to ease testing emails.

Just a quick one for today.

Often I find myself needing to test email sending functionality. I often don't have access to a full mail server, so it's handy to be able to run something up locally to test with. If you've got Python installed, then you can do this really easily. Assuming Python 2.6 on Linux:

python /usr/lib/python2.6/smtpd.py -n -c DebuggingServer localhost:8025

That will start a debugging mail server on port 8025 on your local machine. Simply configure your web app to use an SMTP server running on your dev machine on port 8025, and when the app sends an email, you should see it scroll by on your terminal.


I've disabled comments for now due to spam problems - I'll turn them back on when I've fixed it!

This won't be published anywhere, it's just in case I need to contact you.

You can use Markdown in your comments. Be sensible!

Sorry about this, but I don't want spam comments.