Skip to content

MailHog

Local SMTP server with a web inbox for developers testing outgoing email

Permissive (OSI) · MIT

Listed by , founder & editor

14

Health

Dormant

Overview

Stars

16,208

Last commit

4 years ago

Aug 2022

Repository age

12 years

since Apr 2014

Latest version

v1.0.1

Aug 2020

Contributors

–

Releases

0

last 12 months

Docker pulls

320M

mailhog/mailhog

Language

Go

MailHog is an email testing tool for developers. You point your application's SMTP settings at it, and it catches outgoing messages instead of delivering them. You read them in a web interface or fetch them through a JSON API.

It is written in Go and runs as a single program. By default the SMTP server listens on port 1025 and the web server on port 8025, with messages kept in memory. MongoDB or file-based storage can keep them across restarts. It implements ESMTP with SMTP AUTH and PIPELINING, shows plain text, HTML or source views, and supports multipart MIME. You can also release a message to a real SMTP server. A Docker image is available, and it installs through Homebrew on macOS or pkg on FreeBSD.

The last commit was in 2022 and there have been no releases since v1.0.1, so treat it as unmaintained. It is MIT licensed and is not matched to a specific commercial product.

Who it's for

Web developers testing signup and notification emails

Messages land in a local web inbox, so nothing reaches real users.

Skip if: You need a tool that is still receiving updates and fixes.

Teams running integration tests in CI

The HTTP API lists, fetches and deletes messages so tests can check email content.

Skip if: You need persistent, multi-user storage beyond MongoDB or files.

The problem it solves

Testing email from an app risks sending test messages to real people. MailHog catches them locally so you can inspect them safely.

Strengths

  • Web UI and JSON API for reading captured messages
  • Default SMTP on port 1025, web UI on port 8025
  • Optional MongoDB or file-based persistence
  • Can release messages to a real SMTP server
  • Docker image and Homebrew package available

Trade-offs

  • No commits since 2022 and no releases since v1.0.1
  • Messages are stored in memory by default
  • Hosting on a public network needs extra care, with only basic authentication offered

Self-host MailHog

Self-hostable
Yes
Docker image
mailhog/mailhog

Quick start

brew update && brew install mailhog

From the project's own install instructions. Check the docs for production settings.

Frequently asked questions

Is MailHog free?

Yes. It is open source under the MIT license.

Can I self-host it?

Yes. Run the binary or a Docker image on your own machine or server.

Which ports does it use?

SMTP on 1025 and the HTTP web UI on 8025 by default.

Is it still maintained?

No. The last commit was in August 2022.

Similar tools in Developer utilities

glow

Developer utilities

Terminal Markdown reader that browses local files and renders documents with styling

28k 825 2 months ago Slowing MIT

JADX

Developer utilities

Decompiler that turns Android APK and Dex files into readable Java, with CLI and GUI

52k 6k today Thriving Apache-2.0

it-tools

Developer utilities

Self-hostable web app of small utilities for developers and IT staff

41k 5.6k 9 months ago Dormant GPL-3.0

atuin

Developer utilities

Shell history replacement with SQLite storage and encrypted sync for terminal users

33k 1.1k today Thriving MIT

OmniTools

Developer utilities

Self-hosted collection of browser-based file, image, PDF and data tools

11k 774 31 days ago Slowing MIT

Beekeeper Studio

Developer utilities

Cross-platform SQL editor and database manager for developers who want a simple interface

24k 1.7k today Thriving GPL-3.0