Mailpit
Mailpit is an open source email testing tool for developers — a self-hosted SMTP server with a web UI that catches outgoing mail so you can inspect, debug, and test messages without them ever reaching a real inbox.
What is Mailpit?
Mailpit is an open source email testing tool that runs as a fake SMTP server with a web UI. Point your app’s mail at it during development, and Mailpit catches every message instead of delivering it — so you can view, search, and debug outgoing email without spamming real inboxes. It ships as a single Go binary with zero dependencies.
What is Mailpit best for?
Developers and QA teams who need to see exactly what their application sends. It’s ideal for local development, CI pipelines, and staging environments where you want to confirm that signup emails, password resets, and receipts render and send correctly — without a mail provider or a real recipient in the loop. It’s the actively maintained successor to the popular but discontinued MailHog.
What can Mailpit do?
- Capture SMTP mail and view it as rendered HTML, plain text, raw source, headers, and MIME attachments
- Check HTML/CSS compatibility across email clients and validate links and images
- Score messages for spam via an external SpamAssassin integration
- Expose a REST API and webhooks for automated integration testing
- Relay or forward captured messages on to a real SMTP server when you want them delivered
- Serve captured mail over POP3, tag messages, and search with advanced filters
- Simulate SMTP failures with its “Chaos” mode to test how your app handles errors
- Handle roughly 200–300 messages per second with low memory use
Where does Mailpit fall short?
- It’s a catcher, not a delivery service. Mailpit is for testing — you can’t use it to send production email to real customers (its relay only forwards captured test messages onward).
- Its HTML compatibility check is a rules-based linter, not a live preview. Paid tools like Mailosaur render your email inside real Gmail and Outlook environments; Mailpit flags likely issues but doesn’t screenshot actual clients.
- SpamAssassin scoring isn’t bundled. To get spam scores you have to point Mailpit at a separate SpamAssassin (or Rspamd) service, which is extra setup.
Is Mailpit free?
Yes — Mailpit is completely free and MIT licensed, with no paid tier, seat limits, or hosted upsell. You run the single binary or Docker container yourself and pay nothing for the software. That’s the main contrast with hosted sandboxes, which meter you by test-email volume.
What does Mailpit replace?
Mailpit is a self-hosted, open source alternative to hosted email-sandbox services like Mailtrap and Mailosaur. It does the same core job — capturing outgoing mail so you can inspect it — but keeps the messages on your own machine instead of a third-party cloud, and never bills you per test email.
FAQ
Is Mailpit open source? Yes. Mailpit is released under the permissive MIT license, and the full source is on GitHub. You can self-host, modify, and redistribute it freely.
Can I self-host Mailpit for free? Yes — that’s the only way to run it, and it’s free. It’s a single static Go binary (also on Docker) with no database or external dependencies, listening on SMTP port 1025 and serving its web UI on port 8025 by default.
Is Mailpit a good Mailtrap alternative? For catching and inspecting email in development and CI, yes — and it’s free and self-hosted, versus Mailtrap’s metered plans. If you specifically need real-client render previews or a shared team cloud with accounts, a hosted service may fit better.
What do I need to run Mailpit? Very little — download the binary or run the Docker image, then set your app’s SMTP host to Mailpit. It runs on Windows, Linux, and macOS with minimal memory and no other services required.