An email and SMTP testing tool with API for developers
open sourceMITself-hostablefree
Mailpit is an email testing tool for developers: it runs an SMTP server that catches everything your app sends, shows it in a modern web UI (HTML, source, text, headers, attachments) and has a REST API for integration tests. It checks HTML emails against mail clients, tests links, scores spamminess through SpamAssassin or Rspamd, can relay or forward chosen messages, and can return configurable SMTP errors to test resilience. It's a single static binary or Docker image, MIT-licensed, by Ralph Slooten, and was inspired by MailHog, which is no longer maintained.
Ways to install
On your own server
Package managers
Problems it solves
- catch every email my app sends in development so none reach real customers
- see what our password reset email looks like without sending it to a real inbox
- assert in integration tests that the signup email was sent with the right link
- check our HTML email renders properly in Outlook and Gmail
- find broken links in our transactional emails before release
- test how our app handles the SMTP server rejecting or timing out
- a local SMTP server for staging that we can view from a browser
- replace MailHog, which no longer gets updates
Features
- SMTP server with STARTTLS, SSL/TLS and authentication
- web UI with search, HTML, source, headers and attachments
- REST API for integration testing
- HTML compatibility check, link check and spam check
- SMTP relaying and forwarding
- chaos mode for SMTP errors
- POP3 server
- webhooks for received messages
- message tagging
- single static binary and multi-architecture Docker images
Capabilities
| Has an API | plan not known |
|---|---|
| Has a command line tool | plan not known |
| Sends webhooks | plan not known |
Alternatives
The same job
These do what Mailpit does.
- MailCatcher Catches mail and serves it through a dream
- Mailtrap We Send Emails
- MailHog Web and API based SMTP testing
