Mailpit is an email testing tool designed for developers to streamline the process of capturing, analyzing, and validating emails during development. It acts as an SMTP server, providing a modern web interface with advanced search capabilities and a REST API for integration testing. Key features include support for HTTPS, authentication, real-time updates via web sockets, and functionalities such as link checking, spam score evaluation, and screenshot generation of HTML messages.
Ideal for developers who need to test email functionality in their applications, Mailpit ensures efficient testing and early detection of issues. It helps improve email delivery rates, compatibility across email clients, and enhances overall user experience by validating links and assessing spam potential. Mailpit can be installed via winget, making it easy to integrate into your development workflow.
Modern web UI with advanced mail search to view emails (formatted HTML, highlighted HTML source, text, headers, raw source, and MIME attachments
including image thumbnails), including optional HTTPS & authentication
SMTP server with optional STARTTLS or SSL/TLS, authentication (including an "accept any" mode)
Mobile and tablet HTML preview toggle in desktop mode
Message tagging including manual tagging or automated tagging using filtering and "plus addressing"
SMTP relaying (message release) - relay messages via a different SMTP server including an optional allowlist of accepted recipients
SMTP forwarding - automatically forward messages via a different SMTP server to predefined email addresses
Fast message storing & processing - ingesting 200-300 emails per second over SMTP depending on CPU, network speed & email size,
easily handling tens of thousands of emails, with automatic email pruning by volume or message age (by default keeping the most recent 500 emails)
Chaos feature to enable configurable SMTP errors to test application resilience
Run mailpit -h to see options. More information can be seen in the docs.
If installed using homebrew, you may run brew services start mailpit to always run mailpit automatically.
Testing Mailpit
Please refer to the documentation on how to easily test email delivery to Mailpit.
Configuring sendmail
Mailpit's SMTP server (default on port 1025), so you will likely need to configure your sending application to deliver mail via that port.
A common MTA (Mail Transfer Agent) that delivers system emails to an SMTP server is sendmail, used by many applications, including PHP.
Mailpit can also act as substitute for sendmail. For instructions on how to set this up, please refer to the sendmail documentation.
For team features, multiple inboxes, and a hosted setup, try
Mailtrap, our friendly companion.