
Mailpit
A local fake mail server that catches test emails and shows them in a web UI.
- Stars
- 10.8k
- Forks
- 374
- Licence
- MIT
- Language
- Go
- Last update
- 4 days ago
- Type
- Dev tool
What it is
Mailpit is a small email testing tool. It runs an SMTP server that catches emails your application sends, so they never reach real inboxes, and shows them in a web interface where you can read, search, and check them. It also has a REST API so automated tests can look up captured messages.
- Point a local app's SMTP settings at port 1025 and view the captured emails in the web UI
- Check HTML emails for mail client compatibility with the HTML check feature
- Use the REST API in an automated test to confirm an email was sent
- Run the optional POP3 server to download captured messages into an email client
- Forward or relay captured messages to a real SMTP server using the relay or forward features
Great for
- Developers testing signup, password reset, or notification emails locally
- Teams writing automated integration tests that need to check sent email
- Developers who used MailHog and want a maintained alternative
- People who want a single binary with no extra dependencies to install
Not ideal for
- Anyone needing to deliver mail to real recipients, since it is a test catcher and not a production mail server
- Teams wanting hosted shared inboxes or team features; the README points to a separate commercial product (Mailtrap) for those
- Users who need a full mail transfer agent with delivery queues and bounce handling, as the README does not describe that
How to get it
- 1
Install with a package manager
Install on Mac with Homebrew
brew install mailpitInstall on Linux or Mac with the install script
sudo sh < <(curl -sL https://raw.githubusercontent.com/axllent/mailpit/develop/install.sh) - 2
Run it
- Start Mailpit by running `mailpit` (or `./mailpit` if you downloaded the binary).
- Open the web UI at http://0.0.0.0:8025 in your browser.
- Configure your application to send mail via SMTP on port 1025.
- Send a test email from your app and refresh the web UI to see it.
- 3
Get the most out of it
- Use the REST API in automated tests to check captured messages programmatically
- Enable the optional webhook to react to received messages
- Use plus addressing or filters to tag messages automatically
- Set up sendmail substitution if your application, such as PHP, relies on sendmail
- Run `mailpit -h` to review options such as HTTPS, authentication, and retention limits
Downloads
Strengths
- Runs from a single static binary, and the README describes it as zero-dependency
- Includes a web UI, SMTP server, and REST API in one tool
- Actively maintained, with a recent release (v1.32.0) and a 2026 last push
Trade-offs
- Many advanced features (HTML check, spam check, relaying) depend on additional docs or external services such as SpamAssassin
- Its default behavior keeps only the most recent 500 emails unless configured otherwise
- Features and options are spread across an external documentation site, so the README alone gives limited detail
How it compares
| Project | Stars | Type | Level | Updated | Best for |
|---|---|---|---|---|---|
| mailpit (this) | 10.8k | Dev tool | beginner | 4 days ago | Developers testing signup, password reset, or notification emails locally |
| MailHog | 16.2k | Dev tool | beginner | 2.7 years ago | Developers testing sign-up, password reset, or notification emails locally |
| swag | 13k | Dev tool | intermediate | 1 months ago | Go developers who already have a REST API using Gin, Echo, net/http, Fiber, or another listed framework |
| act | 72.5k | Dev tool | intermediate | 6 days ago | Developers who edit .github/workflows files and want faster feedback than commit-and-push cycles |
| pocketbase | 61.6k | App | beginner | 11 days ago | Developers building a small web or mobile app who want a ready-made backend |
| go-zero | 33.4k | Library | intermediate | 5 days ago | Go developers building REST APIs or microservices |
Stats synced from GitHub. The assessment above was drafted with AI from the project's README on 2026-10-29 and may miss recent changes — check the README before relying on a command. MIT licence: free to use, modify and distribute, including commercially, as long as you keep the copyright notice.