Navigate:
MailHog
~$MAILH0.2%

MailHog: Web and API based SMTP testing

Captures development SMTP traffic with web and API interfaces.

LIVE RANKINGS • 12:29 PM • STEADY
OVERALL
#266
99
DEVELOPER TOOLS
#48
34
30 DAY RANKING TREND
ovr#266
·Devel#48
STARS
15.8K
FORKS
1.2K
7D STARS
+31
7D FORKS
+1
See Repo:
Share:

Learn more about MailHog

MailHog is a testing utility written in Go that implements an ESMTP server for capturing outgoing email during development. It runs as a standalone binary without installation requirements across multiple platforms, accepting SMTP connections on a configurable port while storing messages in memory or persistent backends. The tool provides both a web UI for viewing messages and HTTP APIs for programmatic access, supporting standard email features including MIME multipart messages, RFC2047 encoded headers, and SMTP authentication. Common deployment scenarios include local development environments, Docker containers, and CI/CD pipelines where email testing is needed without external mail server dependencies.

MailHog

1

Single Portable Binary

Runs as a standalone Go binary without installation or runtime dependencies across Linux, macOS, FreeBSD, and Windows. Deploy to any environment without managing language runtimes or system packages.

2

Flexible Storage Backends

Supports in-memory storage for fast temporary testing, plus MongoDB and file-based persistence for retaining messages across restarts. Switch storage strategies without changing application code.

3

Dual Access Interfaces

Offers both web-based and API access for viewing and managing captured emails. The browser interface provides visual inspection while the REST API enables automated testing workflows, allowing integration into CI/CD pipelines and test suites seamlessly.


import smtplib
from email.mime.text import MIMEText

msg = MIMEText("Test email body")
msg['Subject'] = "Test Email"
msg['From'] = "sender@example.com"
msg['To'] = "recipient@example.com"

with smtplib.SMTP('localhost', 1025) as server:
    server.send_message(msg)


vv1.0.1

Minor release to restart project momentum with infrastructure updates and improved distribution options

  • Change to official Golang docker image
  • Documentation updates
  • Addition of Ubuntu snap
vv1.0.0

Major release with updated dependencies, Docker improvements, and TLS websocket support

  • Bump release to 1.0.0
  • updated mgo dependency
  • temporarily remove vendor directory, because of some build issues
  • Fix - add info about proxies
  • Fix - keep tags on docker hub
vv0.2.1

Bug fixes including UTF-8 encoding issues, WebSocket support, and updated dependencies

  • Update.travis.yml to Go 1.6 and tip
  • Fix builds broken by out of date mgo import path
  • fix configuration documentation
  • add search query parameter to Swagger JSON
  • vendor all dependencies

See how people are using MailHog

Loading tweets...


[ EXPLORE MORE ]

Related Repositories

Discover similar tools and frameworks used by developers