Go-MailHog is a lightweight portable application which acts like a SMTP server.
It was inspired by MailCatcher, and does almost exactly the same thing, but without the slow and painful installation you get with
| edit: it was Ruby, not Python – but painful nonetheless!
It was originally written in Perl based on code from M3MTA, but it’s been rewritten in Go for portability, and now runs on any supported platform without installation.
MailHog is designed for testing emails during application development. Instead of using a real SMTP server which delivers messages or has strict rules on email recipients, you can use MailHog and send messages to any email address with a valid format.
Instead of delivering the messages, they’re stored in MongoDB (edit: or memory!), and you can view them using the MailHog web interface, or retrieve them using an API for automated testing.
Using MailHog is as simple as downloading the binary release from GitHub and running it.
With no configuration, it will listen on port 1025 for SMTP, 8025 for HTTP (both web and API), and will connect to MongoDB running on localhost port 27017.
To view messages, point your browser at
http://localhost:8025 or send a GET request to