explaingit

axllent/mailpit

9,384GoAudience · developerComplexity · 2/5LicenseSetup · easy

TLDR

A developer email testing tool that captures every outgoing email from your app during development and shows them in a browser interface, no emails reach real recipients, and it runs as a single binary with no dependencies.

Mindmap

mindmap
  root((Mailpit))
    What it does
      Email capture
      Web inspector
      SMTP server
    Tech Stack
      Go
      Docker
      SMTP
    Use Cases
      Dev email testing
      HTML email check
      CI pipelines
    Extra Features
      Spam scoring
      Email relay
      REST API
    Audience
      Web developers
      Backend devs
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Catch all emails your app sends during development and inspect their HTML, headers, and attachments in a browser

USE CASE 2

Check whether your HTML email renders correctly across email clients using Mailpit's built-in compatibility checker

USE CASE 3

Run automated email assertions in CI pipelines using Mailpit's REST API

USE CASE 4

Occasionally relay a specific captured email out through a real SMTP server while keeping the rest trapped locally

Tech stack

GoDockerSMTP

Getting it running

Difficulty · easy Time to first run · 5min

Single binary with no external dependencies, install via Homebrew, download a release binary, or use Docker.

MIT, use freely for any purpose including commercial use, with no restrictions beyond keeping the copyright notice.

In plain English

Mailpit is a tool for developers who need to test email sending during development without actually delivering emails to real recipients. You run it locally or on a server, point your application's email settings at it, and it captures every outgoing email instead of forwarding them. You can then inspect those captured emails through a web interface in your browser. The web interface shows each captured email in full, including the formatted HTML version, the plain text version, raw headers, attachments, and image thumbnails. It updates in real time as new emails arrive. Beyond just viewing emails, Mailpit includes tools to check whether your HTML email will display correctly across different email clients, verify that all links in the email work, and optionally score the email against spam filters if you have SpamAssassin running nearby. Mailpit runs as a single binary file with no external dependencies, which means installing it is straightforward. It is available through package managers on Mac (Homebrew), Arch Linux, and FreeBSD, or you can download a static binary for Windows, Linux, or Mac directly from the releases page. Docker images are also available. Beyond capturing and viewing emails, Mailpit can optionally relay specific messages out through a real SMTP server, which is useful when you want most emails trapped locally but occasionally need to actually deliver one. It also supports a POP3 server mode so you can pull captured messages directly into a standard email client, and it exposes a REST API for automated testing pipelines. The project was built as a maintained successor to MailHog, which served a similar purpose but has not received updates or security fixes for several years. Mailpit is written in Go and is licensed under the MIT license.

Copy-paste prompts

Prompt 1
Set up Mailpit locally so my Laravel app sends all dev emails to it instead of real recipients, show me the SMTP config
Prompt 2
Run Mailpit with Docker and configure my Node.js app to route its SMTP email to it during development
Prompt 3
Use Mailpit's REST API in my test suite to assert that a welcome email was sent after a user signs up
Prompt 4
How do I configure Mailpit to relay specific emails to a real SMTP server while trapping everything else locally
Prompt 5
Set up Mailpit alongside SpamAssassin to score my marketing emails for spam before I send them to a list
Open on GitHub → Explain another repo

← axllent on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.