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)Maintenance release with no breaking changes; switches to official Golang Docker image and adds Ubuntu snap packaging.
- –Update Docker deployments to use the new official Golang base image instead of the previous custom image.
- –Install via Ubuntu snap if preferred; release notes do not specify security fixes or functional changes.
Maintenance release bumping to 1.0.0 with dependency updates, maildir storage fixes, and TLS websocket support; no breaking changes specified.
- –Update mgo dependency and note that vendor directory was temporarily removed due to build issues.
- –Add `-version` flag for version checks and fix maildir storage bug with leading `\r\n` characters.
Maintenance release fixing UTF-8 attachment encoding, header case sensitivity, and vendoring all dependencies; adds WebSocket support.
- –Upgrade to Go 1.6 or later as dependencies are now vendored and mgo import path is updated.
- –Enable WebSocket support for real-time message updates and verify attachment names render correctly in UTF-8.
Top in Developer Tools
Related Repositories
Discover similar tools and frameworks used by developers
mermaid
JavaScript library rendering text-based diagrams as SVG.
playwright-mcp
Accessibility tree-based browser automation for LLMs.
grbl
Real-time motion control firmware for Arduino-based CNCs.
azure-cli
Cross-platform CLI tool enabling developers and administrators to manage Azure resources through intuitive commands and automation scripts.
jsPDF
Generate PDF documents in-browser with JavaScript APIs.