Repolode
axllent

axllent/mailpit

A small, zero-dependency email testing tool that acts as an SMTP server, with a web UI and REST API to inspect captured mail.

Open-source alternative to:Mailtrap

Stars
10,718
Forks
365
Open issues
1
Last commit
2 days ago

What is it?

Mailpit is an email testing tool for developers. It runs as an SMTP server that captures outgoing mail from your application instead of delivering it, so you can view and check messages during development and testing. It ships as a single static binary or a multi-architecture Docker image.

Captured messages appear in a web UI where you can read formatted HTML, text, headers, raw source and MIME attachments, and search them with filters. A REST API supports automated integration tests, and web sockets push new mail to the interface in real time. Optional features include HTML compatibility checks, link checks, SpamAssassin spam scoring, a POP3 server for downloading messages into an email client, and SMTP relaying or forwarding.

Mailpit is a maintained successor to MailHog. It stores and prunes messages automatically, keeping the most recent 500 by default, and supports chaos mode for simulating SMTP errors.

Key features

  • 01Single static binary or multi-architecture Docker images
  • 02Web UI with search, HTML/text/source views and attachment previews
  • 03SMTP server with STARTTLS, SSL/TLS and authentication options
  • 04REST API for automated integration tests
  • 05Optional POP3 server, SMTP relay and forwarding
  • 06HTML compatibility and link checks, plus SpamAssassin scoring

Use cases

  • Catching outgoing emails from an application during local development
  • Writing integration tests that assert on sent emails via the REST API
  • Checking how HTML emails render across mail clients before sending
  • Acting as a sendmail substitute for PHP or other systems that send mail locally

Quick start

  1. 1

    Install via Homebrew on Mac

    brew install mailpit
  2. 2

    Start Mailpit and open the web UI at http://0.0.0.0:8025

    mailpit

Things to know

  • The install script for Linux and Mac is a curl-piped shell command, so it is not listed here; use a package manager or static binary instead.

Topics

FAQ

What is mailpit?
A small, zero-dependency email testing tool that acts as an SMTP server, with a web UI and REST API to inspect captured mail. Mailpit is an email testing tool for developers. It runs as an SMTP server that captures outgoing mail from your application instead of delivering it, so you can view and check messages during development and testing. It ships as a single static binary or a multi-architecture Docker image.
Is mailpit free to use? What license does it have?
mailpit is open source under the MIT license. Check the license terms before using it in commercial products.
Is mailpit still maintained?
Actively maintained. The last commit to mailpit was on Oct 20, 2026.
What can I use mailpit for?
Catching outgoing emails from an application during local development Writing integration tests that assert on sent emails via the REST API Checking how HTML emails render across mail clients before sending Acting as a sendmail substitute for PHP or other systems that send mail locally
How do I install mailpit?
Install via Homebrew on Mac: brew install mailpit Start Mailpit and open the web UI at http://0.0.0.0:8025: mailpit
Where can I get mailpit?
The source code and installation instructions are on GitHub: https://github.com/axllent/mailpit

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects