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.
smtp4dev is an open-source fake SMTP server frequently used for development purposes. The fastest way to get started with this option is to install Docker on your development machine and use the smtp4dev Docker container.
It can be downloaded from GitHub as well. smtp4dev is a cross-platform fake SMTP mail server, which is completely free of charge, designed to help developers and testers to intercept and inspect emails that are sent out from their applications.
FakeSMTP is a Free Fake SMTP Server with GUI for testing emails in applications easily. It is written in Java. Configure your application to use localhost as your SMTP server, and all emails will be intercepted and displayed in this software. FakeSMTP uses SubEthaSMTP: an easy-to-use server-side SMTP library for Java.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With