MailHog: Web and API based SMTP testing
Captures development SMTP traffic with web and API interfaces.
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.
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.
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.
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)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
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
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
Top in Developer Tools
Related Repositories
Discover similar tools and frameworks used by developers
open-directory
Command-line search engine for indexed open directories.
Mermaid Live Editor
SvelteKit application for authoring and rendering Mermaid diagrams.
Swag
CLI tool that generates Swagger 2.0 API documentation from Go source code annotations.
Nano ID
Compact 21-character cryptographic IDs with URL-safe encoding.
Spring Initializr
Extensible API for generating JVM projects with multi-language and build system support.