A simple local SMTP server

sathish kumar picture sathish kumar · Dec 22, 2011 · Viewed 58.1k times · Source

I want to test a Java code for sending email. I don't want to use any commercial mail client or connect to any external mail providers (like Gmail or Yahoo). I would like to know if there is any software which allows a user to configure dummy email addresses and server (locally) which can be used in my software to send and receive mails. I just want to test the functionality of the Java code.

Answer

Matthew Farwell picture Matthew Farwell · Dec 22, 2011

For email testing, try Dumbster. From their page:

The Dumbster is a very simple fake SMTP server designed for unit and system testing applications that send email messages. It responds to all standard SMTP commands but does not deliver messages to the user. The messages are stored within the Dumbster for later extraction and verification.

The Dumbster slots itself very easily into your testing strategy. As long as your application talks to an email server using SMTP then the Dumbster can be used to test the application with no code changes.

Various forks exist since the original page is no longer available:

More can be found using a Github Search