Skip to main content
coreydaley.dev

MessagePit

Email and SMS testing for developers

Catch every email.
Catch every text.

Send test emails and SMS messages from your app and inspect them in one web UI. Nothing reaches a real inbox or a real phone.

Open source · MIT · Go · Docker · An unofficial fork of Mailpit

MessagePit web UI with Email, SMS and Webhooks tabs and an inbox of twelve captured test emails

One local stand-in for your messaging providers

Everything Mailpit does for email, plus the SMS, API and webhook pieces a modern app sends through.

  • Email over SMTP

    An SMTP server on port 1025 with Mailpit’s web UI, REST API, search, tagging, live WebSocket updates and an optional POP3 server.

  • Twilio-compatible SMS

    An SMS ingest server that implements Twilio’s Messages.json endpoint, with an SMS inbox, read/unread tracking and live updates.

  • SendGrid v3 stub

    POST /v3/mail/send accepts the standard SendGrid JSON payload and drops each message into the MessagePit mailbox.

  • Webhook capture

    A capture server that records any request on any path and method, so you can inspect your app’s outbound webhooks without a public endpoint.

  • Delivery callbacks

    Signed Twilio status callbacks and SendGrid-style event webhooks, so your app can track delivery end to end, failure branches included.

  • Docker-ready

    A multi-arch image on the GitHub Container Registry, with optional HTTP basic auth and Prometheus metrics.

Real SDKs, local endpoints

Point your Twilio and SendGrid
SDKs here.

MessagePit is a local stand-in for Twilio and SendGrid that your app reaches through the same official SDKs it uses in production. Change the API base URL, keep the code. Send endpoints, auth, response shapes and error codes follow the real APIs, and delivery callbacks come back signed the way the real providers sign them, so your webhook handlers verify them with the standard SDK helpers.
  • Twilio: POST /2010-04-01/Accounts/{AccountSid}/Messages.json on port 8200
  • SendGrid: POST /v3/mail/send on port 8100
  • SMTP: port 1025, like any other SMTP catcher

SMS integration SendGrid stub Rails example

.env.development
# SMS: twilio-ruby, routed to MessagePit
TWILIO_ACCOUNT_SID=test
TWILIO_AUTH_TOKEN=test   # must match MP_TWILIO_AUTH_TOKEN
TWILIO_API_URL=http://localhost:8200

# Email: sendgrid-actionmailer
SENDGRID_API_KEY=test    # must match MP_SENDGRID_API_KEY
SENDGRID_API_URL=http://localhost:8100

Ports

One container, six listeners

Ports are grouped by provider type: email API stubs in 8100–8199, SMS stubs in 8200–8299, capture tools in 8300–8399.

  • 1025 · SMTP

    Email ingest (mirrors port 25).

  • 1110 · POP3

    POP3 server (optional).

  • 8025 · HTTP

    Web UI and management API.

  • 8100 · HTTP

    SendGrid v3 Mail Send stub, POST /v3/mail/send.

  • 8200 · HTTP

    SMS ingest, Twilio-compatible.

  • 8300 · HTTP

    Webhook capture: accepts any request on any path and method.

Ports, Docker and Compose →

Quick start

One command
to a running inbox.

Run the image from the GitHub Container Registry, or build from source with Go 1.21+ and Node 22+. Then open http://localhost:8025.
  • In-memory storage by default; --db for a SQLite file
  • Every flag has an MP_* environment variable
  • The SendGrid stub listens on loopback unless you set MP_SENDGRID_BIND_ADDR

Getting started Configuration

terminal
# Docker
docker run \
  -p 1025:1025 -p 8025:8025 -p 8100:8100 \
  -p 8200:8200 -p 8300:8300 \
  -e MP_SENDGRID_BIND_ADDR=0.0.0.0:8100 \
  ghcr.io/coreydaley/messagepit

# From source
git clone https://github.com/coreydaley/messagepit
cd messagepit
make run   # http://localhost:8025

Credit · Open source · MIT

Built on Mailpit.
MIT licensed, like Mailpit.

MessagePit is a fork of Mailpit, the email testing tool by Ralph Slooten (axllent). Mailpit provides the foundation: the SMTP server, web UI, REST API, search, tagging and POP3 server. MessagePit adds SMS, the SendGrid stub, webhook capture and delivery callbacks on top. Thank you, Ralph.

MessagePit is an independent, unofficial fork. It isn’t affiliated with or endorsed by Mailpit or its author, so please report MessagePit issues to the MessagePit repository, not upstream. It keeps Mailpit’s MIT license and original notice, Copyright (c) 2022-Now() Ralph Slooten, in its LICENSE. If you only need email testing, use Mailpit.

View on GitHub Releases Mailpit on GitHub