Skip to content
PortBay

Local development

The MailHog alternative for Mac: Mailpit, set up two ways

MailHog hasn't shipped a release since August 2020. Mailpit is the drop-in successor — same ports, modern UI, an API your tests can use. The two-minute Homebrew setup, the MailCatcher comparison, and the zero-config route.

Nour Beiruti6 min read

If you're looking for a MailHog alternative, the short answer is Mailpit. MailHog's last release was v1.0.1 in August 2020 — it still runs, but development stalled years ago. Mailpit is the actively maintained successor: the same idea (a fake SMTP server that catches every email your app sends and shows it in a web UI), the same default ports, a modern interface, a REST API for tests, and an MIT license. Releases ship steadily — v1.30 landed in May 2026. Here's the two-minute Homebrew setup, the comparison with MailCatcher, and the zero-config route if you'd rather not manage another service at all.

Why replace MailHog at all?

Nothing dramatic — dormancy is the whole story. MailHog (16k GitHub stars, written in Go) was the default answer for local mail capture for a decade, and the binary you installed in 2020 still catches mail today. But six years without a release means no fixes, no features and no guarantees against whatever macOS or your toolchain changes next. For a tool that sits in every project's .env, “still works for now” is a weak foundation. Mailpit was built as the modern replacement and is the default mail catcher in a growing number of dev tools.

Mailpit on macOS in two minutes

brew install mailpit
brew services start mailpit
# SMTP capture:  127.0.0.1:1025
# Web UI + API:  http://localhost:8025

Because Mailpit uses MailHog's default ports (1025 for SMTP, 8025 for the UI), it's a genuine drop-in — existing projects keep working without touching configuration. For a Laravel app, the .env looks like:

MAIL_MAILER=smtp
MAIL_HOST=127.0.0.1
MAIL_PORT=1025

Every email your app sends — password resets, order confirmations, the embarrassing test blast that would have gone to real customers — lands in the UI at localhost:8025instead of the internet. The REST API lets test suites assert that a mail was sent, to whom, with what subject — something MailHog's API did less comfortably.

MailCatcher vs Mailpit

MailCatcher is the other name that comes up, and it's the same concept from the Ruby world — a gem (gem install mailcatcher) capturing on port 1025 with a UI on 1080. It still gets occasional releases (v0.10.0, May 2024) and if you're in a Ruby shop with the toolchain already installed, it's fine. For everyone else, Mailpit's case is plainer: a single Go binary with no runtime dependency, a faster release cadence, message tagging, an API built for CI, and SMTP relaying when you need to forward a real message. In 2026 there's no scenario where we'd recommend starting fresh with MailCatcher over Mailpit.

The zero-config way

Mail capture is one of five services a working PHP or Node project needs locally — alongside the runtime, a database, HTTPS and a domain. That's the case for getting it as part of a managed environment instead of as another Homebrew service: PortBay (free, open source, macOS) ships Mailpit-based mail capture built in, per project, with the rest of the stack provisioned around it. Honest framing: if mail capture is genuinely all you need, brew install mailpitis enough and you should just do that. The managed route earns its place when you're also juggling PHP versions, databases and certificates — notably, mail capture is a paid feature in both Laravel Herd (Pro, $99/yr) and ServBay (Pro), while PortBay and FlyEnv include it free. Download PortBay and the whole stack — Mailpit included — comes up with one Play button; the PHP-on-Mac guide shows where mail fits in the larger setup.

PortBay mascot — a friendly blue tugboat

Run your first local site in one click.

Download for macOS

Free & open source · macOS 11+ on Apple Silicon · Pro from $10/mo