1. Products
  2.   Email
  3.   GO
  4.   MailHog

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 applications to use MailHog for SMTP delivery, you can retrieve 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 a Web interface to view text or HTML emails, displays real-time email updates, and releases emails to real SMTP servers. Furthermore, the API supports multipart MIME & allows downloading individual 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 without installation on multiple platforms

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",
  "host": "...",
  "port": "587",
  "email": "...",
  "username": "...",
  "password": "...",
  "mechanism": "PLAIN"

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