CheckOps
Mailpit
Mailpit is an MIT-licensed email testing tool for developers: a local SMTP server that captures outgoing mail, with a web UI, REST API, HTML and link checks, and chaos options for integration tests.
Latest public signals
Not refreshed yet. Refresh reads the public site and, when the entry has a GitHub repository, the latest release.
Introduction
Mailpit is a small, fast, zero-dependency email testing tool. It runs an SMTP server that accepts mail from your application, stores it, and shows it in a modern web interface instead of delivering it. Developers use it so that sign-up, password-reset and notification emails can be tested without sending anything to real inboxes.
The project says it was inspired by MailHog, which it notes is no longer maintained and has not had security updates for years. Mailpit has become the common replacement in local development stacks and CI pipelines, and it ships as a single static binary and multi-architecture Docker images, so it is easy to add to Docker Compose or a CI service container.
For automated tests, the key feature is the REST API. A test can trigger an action in the app, then query Mailpit’s API for the newest message to a given address, read its subject, HTML, text or attachments, extract a link or one-time code, and continue the end-to-end flow. Webhooks can notify another service when mail arrives, and messages can be tagged automatically through filters or plus-addressing.
Mailpit also checks the quality of the email itself. An HTML check scores compatibility with popular mail clients, a link check tests links and linked images, and a spam check can score messages through SpamAssassin or Rspamd. The UI includes mobile and tablet previews and can create screenshots of HTML messages, and List-Unsubscribe headers are validated.
For resilience testing, a ‘Chaos’ feature makes the SMTP server return configurable errors so you can see how your application handles a failing mail provider. Mailpit can also relay or forward selected messages through a real SMTP server when you do want a copy delivered, and it offers an optional POP3 server. The README reports ingesting about 200 to 300 emails per second over SMTP, depending on hardware.
In the quality loop, Mailpit belongs at the integration and end-to-end stages. It is free and self-hosted, which suits local development and CI; teams that need hosted inboxes reachable from staging environments or SMS testing usually look at services such as Mailtrap, Mailosaur or MailSlurp.
Features
- SMTP capture: An SMTP server with optional STARTTLS or SSL/TLS and authentication, including an ‘accept any’ mode.
- Web UI: View formatted HTML, highlighted source, text, headers, raw source and attachments, with advanced search.
- REST API: Query, read and delete messages from automated tests.
- HTML check: Score how well an HTML email is supported across mail clients.
- Link check: Test links and linked images in HTML and text parts.
- Spam check: Score messages with a running SpamAssassin or Rspamd server.
- Chaos mode: Inject configurable SMTP errors to test how your app handles failures.
- Relay and forward: Release chosen messages or auto-forward to real addresses through another SMTP server.
- Tagging and webhooks: Tag messages automatically and send webhooks when mail arrives.
- Single binary and Docker: Runs anywhere from one static binary or multi-arch images.
Pros
- Drop-in for MailHog: Same role, actively maintained and with more features.
- Great for CI: Easy to run as a service container and query from tests.
Cons
- Self-hosted only: No hosted inboxes; staging environments need their own instance.
- Email only: No SMS or phone testing, unlike some hosted services.
- Not a deliverability tool: It does not test real inbox placement with providers such as Gmail or Outlook.
Usage and Links (Example)
Run Mailpit with Docker and point your app at port 1025:
docker run -d --name mailpit -p 8025:8025 -p 1025:1025 axllent/mailpit
Open http://localhost:8025 for the UI. In a test, read the newest message through the API:
curl -s "http://localhost:8025/api/v1/search?query=to:new.user@example.com&limit=1"
Practical tips:
- Add Mailpit as a CI service and clear messages (
DELETE /api/v1/messages) before each test. - Use plus-addressing (
user+signup@example.com) to keep tests isolated. - Turn on the HTML check in review to catch templates that break in common clients.
Resources:
Pricing
See site.
Recommended for?
- Developers testing sign-up, reset and notification emails locally and in CI.
- Teams replacing MailHog.
- End-to-end suites that need to read a link or code from an email.
- Not a fit if you need hosted inboxes, SMS testing or real deliverability checks.
Conclusion
Mailpit is the go-to self-hosted email testing tool for modern development stacks. It is fast, easy to run and has an API and checks that go well beyond simple mail capture.
For most teams it should be the default way to keep test emails out of real inboxes while still testing the full flow.
On CheckOps, Mailpit is filed under the End-to-end & functional and Integration testing stages. Related tools listed here include Mailtrap, Mailosaur, MailSlurp, WireMock, Testcontainers and MockServer. Before choosing, compare them on licence, supported languages and platforms, hosting model, and how well each fits your existing CI pipeline. Facts on this page were checked against the official website, documentation and repository on 11 November 2026; statements the vendor makes about its own product are marked as vendor claims.
Alternatives
Other tools on CheckOps that cover similar ground. Open a page, or compare one with Mailpit side by side.
MMailtrapMailtrap is a commercial email platform whose Email Sandbox captures and inspects emails from development, staging and QA environments, alongside sending APIs and device previews.Compare with Mailpit
MMailosaurMailosaur is a commercial email and SMS testing service with secure test inboxes, dedicated phone numbers, real-device email previews and APIs for automating sign-up, OTP and MFA flows.Compare with Mailpit
MMailSlurpMailSlurp is a commercial email and SMS API for testing and automation, with programmable inboxes, phone numbers, OTP capture, device previews and an MCP server for AI agents.Compare with Mailpit
WWireMockA tool for mocking HTTP services.Compare with Mailpit
TTestcontainersTestcontainers starts throwaway Docker containers from tests so integration tests can use real databases, brokers, and browsers.Compare with Mailpit
MMockServerOpen-source HTTP/1.1, HTTP/2, HTTP/3, HTTPS and gRPC mock server, recording proxy, and MCP server for AI assistants.Compare with Mailpit