Mockmail

A lightweight fake SMTP server

Download v1.1.1 View on GitHub

What is Mockmail

  • Mockmail is a fake smtp server intended to use as a developer tool.
  • Mockmail is lightweight and easy to use.
  • By design, Mockmail does not relay emails to their intended recipients.
  • Instead, every email Mockmail receives is saved to a file.

Why would you want to use this tool.

  • You need a simple smtp server to test you web app.
  • You need to be able to read every email sent by your application.
  • You need to be able to send email to fake addresses used in your application's sample data.
  • You want the peace of mind that the recipients will not receive your test emails in the case real emails are present in your database.

Installation

Download the application. Unzip the file in any folder.

Usage

To start Mockmail with the default settings, simply type:

$ java -jar mockmail.jar

To stop Mockmail, use ctrl+c

For possible command line options use the -help argument

$ java -jar mockmail.jar -help

usage: java -jar MockMail.jar
 -help                print this message
 -outdir <path>       Folder where the email files will be stored. Can be
                      relative to the working dir. Default : 'mail'
 -port <portnumber>   Port number where MockMail serves smtp requests.
                      Default : 2525.