- Home
- Email Testing Software
- MailHog
MailHog
What it is
MailHog is a free, MIT-licensed email testing tool for developers. Applications send messages to it over SMTP, then users inspect them in a web interface or retrieve them through a JSON API. The interface shows plain text, HTML, or source, supports RFC2047 encoded headers, and updates through EventSource. The API lists, retrieves, and deletes messages and can download complete messages or individual MIME parts. Messages may optionally be released to real SMTP servers. MailHog implements ESMTP RFC5321 and supports SMTP AUTH RFC4954 and PIPELINING RFC2920; its Chaos Monkey feature supports failure testing. Storage defaults to memory, with MongoDB and Maildir alternatives. It can run from the command line, as a daemon, in Docker, or on AWS Elastic Beanstalk, with a SaltStack formula documented. Default ports are 1025 for SMTP and 8025 for HTTP. HTTP basic authentication can protect requests using a bcrypt-password file. Node.js and PHP client libraries plus mhsendmail are listed integrations. In-memory Elastic Beanstalk deployments are limited to one instance.
For and against
For
- Web UI displays text, HTML, and source
- JSON API manages messages and MIME parts
- Optional release to real SMTP servers
- Memory, MongoDB, and Maildir storage
- Includes Chaos Monkey failure testing
Against
- In-memory Elastic Beanstalk supports one instance
- Load-balanced deployments require MongoDB storage
- Free trial is not offered
The verdict
MailHog covers SMTP capture, inspection, API retrieval, and several deployment styles for development workflows. Storage choices and the Elastic Beanstalk limitation should guide deployment planning.
Who it suits
MailHog suits developers who need local or self-hosted SMTP capture, message inspection, API access, and controlled failure testing. It supports macOS, Linux, FreeBSD, Docker, web, API, and self-hosted setups.
Plans and prices
MailHog
Open-source email testing tool · MIT license
Read 4 Oct 2026 · github.com
On the record
- Authentication
- HTTP basic authentication can protect all HTTP requests, including static content and API endpoints, using a password file with bcrypt-hashed passwords.github.com · read 4 Oct 2026
- Default ports
- By default, the SMTP server listens on port 1025 and the HTTP server listens on port 8025.github.com · read 4 Oct 2026
- Deployment
- MailHog can be run from the command line, as a daemon, in Docker, or on AWS Elastic Beanstalk; the deployment guide also documents a SaltStack formula.github.com · read 4 Oct 2026
- Failure testing
- MailHog includes a Chaos Monkey feature for failure testing.github.com · read 4 Oct 2026
- HTTP API
- The HTTP API can list, retrieve, and delete messages, and supports downloading complete messages and individual MIME parts.github.com · read 4 Oct 2026
- Integrations
- The project lists Node.js API v2 and PHP API v1/v2 client libraries and provides mhsendmail as a sendmail replacement.github.com · read 4 Oct 2026
- License
- MailHog is released under the MIT license.github.com · read 4 Oct 2026
- Message release
- Messages can optionally be released to real SMTP servers for delivery.github.com · read 4 Oct 2026
- Notable limit
- With in-memory storage, an Elastic Beanstalk deployment can use only a single MailHog instance; load-balanced deployments require MongoDB-backed storage.github.com · read 4 Oct 2026
- Platform support
- The README provides installation instructions for macOS, Debian/Ubuntu, FreeBSD, and Docker, and says MailHog runs without installation on multiple platforms.github.com · read 4 Oct 2026
- Purpose
- MailHog is an email testing tool for developers that accepts application mail over SMTP and lets users view messages in a web UI or retrieve them through a JSON API.github.com · read 4 Oct 2026
- SMTP
- MailHog implements ESMTP RFC5321 and supports SMTP AUTH RFC4954 and PIPELINING RFC2920.github.com · read 4 Oct 2026
- Storage
- Message storage can use memory, MongoDB, or Maildir; the default is in-memory storage.github.com · read 4 Oct 2026
- Web interface
- The web interface displays messages as plain text, HTML, or source and supports RFC2047 encoded headers and real-time updates using EventSource.github.com · read 4 Oct 2026