For the complete documentation index, see llms.txt. This page is also available as Markdown.

Mailtrap Local

Mailtrap Local is the free, open-source local version of Mailtrap Email Sandbox. It lets you capture and inspect emails entirely on your own machine during development. It combines a local SMTP server, web interface, and REST API into a single self-contained binary - no account, cloud setup, or additional dependencies required.

Mailtrap Local is designed for development and testing only. When you need to collaborate with teammates, you can send captured messages to Mailtrap Email Sandbox using Send to Cloud.

Mailtrap Local is fully open source: GitHub repository.

Once running, Mailtrap Local gives you a web interface to browse and search captured messages and inspect each one in full: rendered HTML and plain-text versions, headers, raw source, and attachments. It also runs an HTML Check that flags compatibility issues across major email clients (Outlook, Gmail, Apple Mail, and others), so you catch rendering problems before release.

Mailtrap Local is commonly used for:

Local email development - Test email-sending features without sending messages outside your development environment.

Email debugging - Reproduce and troubleshoot email-related issues locally before deploying changes.

Template development - Preview and iterate on email templates built with React Email, MJML, Handlebars, or other templating frameworks.

CI testing - Run automated email tests in CI environments without connecting to a real email provider.

AI agent development - Catch unintended emails generated by local AI agents before they reach real recipients.

In addition to local email capture, Mailtrap Local lets you:

Send to Cloud

Promote any captured email to Mailtrap Email Sandbox so teammates can review it without accessing your local environment

Auto Relay

Forward captured emails through Mailtrap SMTP or any external SMTP provider, such as SendGrid, Mailgun, Amazon SES, or Postmark, when you need to verify delivery in a real inbox

How it works

Install Mailtrap Local via Homebrew or Docker, or grab a prebuilt binary from the Releases pageThen start it:

mailtrap-local

By default, Mailtrap Local listens for SMTP traffic on localhost:3535 and serves a web interface at localhost:3550. Configure your application to use the local SMTP server, and every outgoing email will be captured instead of being delivered. You can then open the web interface to inspect each message.

Last updated

Was this helpful?