Mailpit logo

Mailpit

Fast, zero-dependency email testing tool for developers

Mailpit is a lightweight SMTP server with a modern web UI and REST API for capturing, viewing, and testing emails during development and automated integration testing.

Mailpit banner

Overview

Email Testing Built for Modern Development

Mailpit is a high-performance email testing tool designed for developers who need to capture and inspect emails without sending them to real recipients. Built as a single static binary with zero dependencies, it runs on Windows, Linux, and Mac with minimal resource overhead.

Comprehensive Testing Capabilities

The tool provides an SMTP server (default port 1025) that captures all outbound mail, paired with a modern web interface (port 8025) for inspecting messages. View formatted HTML, highlighted source code, headers, MIME attachments with image thumbnails, and raw message data. Real-time web socket updates notify you instantly when new mail arrives.

Advanced Features for Quality Assurance

Mailpit goes beyond basic capture with HTML compatibility scoring, link validation, SpamAssassin integration for spam testing, and screenshot generation. The REST API enables automated integration testing, while optional POP3 support lets you download messages directly into email clients. Message tagging, SMTP relaying, and configurable chaos testing help validate application resilience. With the ability to ingest 100-200 emails per second and handle tens of thousands of messages, Mailpit scales from solo developers to CI/CD pipelines.

Highlights

Single static binary with zero dependencies and multi-platform Docker images
Modern web UI with real-time updates, advanced search, and HTML/spam/link testing
REST API for automated integration testing and optional POP3 server
High-performance SMTP server processing 100-200 emails/second with automatic pruning

Pros

  • Extremely lightweight with minimal memory footprint and no external dependencies
  • Comprehensive testing tools including HTML compatibility, spam scoring, and link validation
  • Fast performance handling tens of thousands of emails with real-time web updates
  • Flexible deployment via binary, Docker, package managers, or sendmail replacement

Considerations

  • Default 500-email retention limit requires configuration adjustment for larger test suites
  • Advanced features like SpamAssassin integration require external service setup
  • SMTP relaying and forwarding need additional configuration for production-like testing
  • Web UI authentication is optional, requiring manual enablement for shared environments

Managed products teams compare with

When teams consider Mailpit, these hosted platforms usually appear on the same shortlist.

Mailinator logo

Mailinator

Disposable email testing inboxes with public and private domains

Mailosaur logo

Mailosaur

Email & SMS testing with disposable inboxes and phone numbers

MailReach logo

MailReach

Email warm-up and spam testing to boost inbox placement

Looking for a hosted option? These are the services engineering teams benchmark against before choosing open source.

Fit guide

Great for

  • Development teams needing fast, reliable email capture during local development
  • CI/CD pipelines requiring automated email testing via REST API
  • QA engineers validating email rendering, deliverability, and spam scores
  • Small to medium teams wanting zero-maintenance email testing infrastructure

Not ideal when

  • Production email delivery or customer-facing transactional email services
  • Teams requiring permanent email archival beyond automatic pruning limits
  • Organizations needing enterprise SSO or advanced access control mechanisms
  • Scenarios requiring detailed email analytics or long-term reporting dashboards

How teams use it

Local Development Email Capture

Developers test registration flows, password resets, and notifications without sending real emails or configuring external services

Automated Integration Testing

CI/CD pipelines verify email content, headers, and attachments via REST API assertions in test suites

Email Template Quality Assurance

Marketing teams validate HTML rendering across clients, check link integrity, and score spam likelihood before campaigns

Microservices Email Validation

Docker-based development environments capture emails from multiple services in a single interface for debugging

Tech snapshot

Go72%
Vue24%
JavaScript2%
SCSS1%
Shell1%
HTML1%

Tags

email-testingsmtp-serversmtp-relaygosmtp-testingmailpitgolangpop3-server

Frequently asked questions

How does Mailpit differ from MailHog?

Mailpit is actively maintained with modern features like HTML compatibility testing, spam checking, link validation, and significantly better performance. It was inspired by MailHog but built from scratch with enhanced capabilities.

Can Mailpit relay emails to real SMTP servers?

Yes, Mailpit supports SMTP relaying to forward captured messages to external servers, with optional recipient allowlists for controlled testing of real delivery.

Does Mailpit store emails permanently?

No, Mailpit automatically prunes emails, keeping the 500 most recent by default. This limit is configurable but the tool is designed for testing, not archival.

What authentication options are available?

The SMTP server supports STARTTLS, SSL/TLS, and authentication including an 'accept any' mode. The web UI supports optional HTTPS and authentication for secure access.

How do I integrate Mailpit with my application?

Configure your application to send email via SMTP to localhost:1025. For PHP and other sendmail-based apps, Mailpit can act as a sendmail replacement. Use the REST API for automated testing.

Project at a glance

Active
Stars
8,538
Watchers
8,538
Forks
252
LicenseMIT
Repo age3 years old
Last commit3 days ago
Primary languageGo

Last synced 3 hours ago