Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Dummy SMTP server for development purposes [closed]

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.

like image 333
at. Avatar asked Apr 27 '11 22:04

at.


People also ask

How do I set up a fake SMTP server?

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.

What is smtp4dev?

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.

What is FakeSMTP?

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.


1 Answers

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 
like image 113
Mic Avatar answered Nov 11 '22 17:11

Mic