Alex Rivera | Logout

Dummy SMTP server for development purposes

Asked 2011-04-27T22:32:12.460
42

I've been using a dummy smtp server called DevNull SMTP so that I can test my app which sends out notification emails. It has a nice simple GUI, very helpful, but can't be scripted easily. I can't even start it listening to port 25. I have to run the app and then click on the start button...

Is there a similar app that can be scripted easily? Scripted in the sense that I can control it from a bash script or windows batch file and possibly even query the emails from my unit/functional tests.

Edit
Report

1 Answer

106

there is a nice trick with python: http://muffinresearch.co.uk/archives/2010/10/15/fake-smtp-server-with-python/

Just one liner can do the job (listens on port 2500):

python -m smtpd -n -c DebuggingServer localhost:2500
answered 2011-06-14T13:28:55.130

Your Answer