Open Source Go Library for Testing Email Messages

Free Email Testing Tool for developer, developed in GO.

MailHog is an Open Source email testing tool for developers. You can configure your applictions to use MailHog for SMTP deli, you can reterive email messages with the JSON API or view them in the web UI. You can also end messages to real SMTP servers.

MailHog implement ESMTP server implementation, supports SMTP AUTH and PIPELINING, provides Web interface to view text or HTML emails, display real time email updates and releases emails to real SMTP servers. Furthermore, the API supports multipart MIME & allows downlading indiviual MEME parts. MailHog uses In-memory message storage and uses MongoDB and file based storage for message persistence.

Previous Next

Getting Started with MailHog

MailHog is built with GO that runs withour installation on multiple platofrms

Run MailHog on MacOS

brew update && brew install mailhog
You can start running MailHog in MacOs by running mailhog in the command line.

Configure MailHog for Outgoing SMTP

In order to configure outgoing SMTP you need to create JSON file with the following structure and set MH_OUTGOING_SMTP or -outgoing-smtp.

"server name": {
 "name":"server name",

In the JSON file, only name, host and port are requried to send SMPT email.