Skip to content

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
Step-by-step guide: how to use MailpitInstall, first run, examples, tips and FAQs

How to get it

  1. 1

    Install with a package manager

    Install on Mac with Homebrew

    brew install mailpit

    Install on Linux or Mac with the install script

    sudo sh < <(curl -sL https://raw.githubusercontent.com/axllent/mailpit/develop/install.sh)
  2. 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. 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

ProjectStarsTypeLevelUpdatedBest for
mailpit (this)10.8kDev toolbeginner4 days agoDevelopers testing signup, password reset, or notification emails locally
MailHog16.2kDev toolbeginner2.7 years agoDevelopers testing sign-up, password reset, or notification emails locally
swag13kDev toolintermediate1 months agoGo developers who already have a REST API using Gin, Echo, net/http, Fiber, or another listed framework
act72.5kDev toolintermediate6 days agoDevelopers who edit .github/workflows files and want faster feedback than commit-and-push cycles
pocketbase61.6kAppbeginner11 days agoDevelopers building a small web or mobile app who want a ready-made backend
go-zero33.4kLibraryintermediate5 days agoGo 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.