Skip to content

A mock SMTP server built with Java

License

Notifications You must be signed in to change notification settings

pks-1981/MockMock

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

71 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status

MockMock :: Mock SMTP Server

MockMock is a cross-platform SMTP server built on Java. It allows you to test if outgoing emails are sent (without actually sending them) and to see what they look like. It provides a web interface that displays which emails were sent and shows you what the contents of those emails are. If you use MockMock you can be sure that your outgoing emails will not reach customers or users by accident. It really just is a mock SMTP server and has no email sending functionality.

Mail overview page

Mail overview page

Mail detail page

Mail detail page

Requirements

MockMock is built using Java and to function you need a Java 7 runtime environment. MockMock works on OSX, Windows and *nix based platforms that have a Java 7 runtime environment. You can download the Java 7 runtime environment here.

Installation / setup

The easiest way to install and run MockMock is by downloading the jar file here (right click -> "save target as"). Extract it to any place you like and start the server by running: java -jar MockMock.jar

This will run MockMock on the default ports 25 (for SMTP) and 8282 (the web interface). Please note you might need root permissions on some systems to let it listen on port 25. After it started you can use your internet browser to navigate to [http://localhost:8282] (replace host name and web port if necessary). This will now show you the emails it received (which should be none at the moment). You can now send emails using the built in SMTP server running on port 25 by default. The emails should be visible via the web interface. To run MockMock on another port, you can start it with the following parameters: java -jar MockMock.jar -p 25000 -h 8080

This will run MockMock on SMTP port 25000 and http port 8080.

Running as a Daemon

The package contains an init.ubuntu file which you can use on Debian based systems. Rename the file to mockmock and place it inside the /etc/init.d/ folder. Edit the file and make sure the paths in there are correct. Also give the file execute permission by running: chmod +x /etc/init.d/mockmock

You can now start MockMock as a daemon by running: /etc/init.d/mockmock start

About

A mock SMTP server built with Java

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 94.7%
  • Shell 4.5%
  • Other 0.8%