Open source mail delivery platform for sending and receiving email, a self-hosted alternative to services like SendGrid, Mailgun and Postmark.
sj26/mailcatcher
A local SMTP server that catches outgoing email during development and shows it in a web interface.
Open-source alternative to:Mailtrap
- Stars
- 6,783
- Forks
- 604
- Open issues
- 43
- Last commit
- last month
What is it?
MailCatcher runs a simple SMTP server that catches every message sent to it and displays them in a web interface. You point your application's mail delivery at smtp://127.0.0.1:1025 instead of a real mail server, then open http://127.0.0.1:1080 to browse the messages that have arrived. It is aimed at developers who need to test outgoing email without delivering it to real recipients.
Messages can be viewed as HTML, plain text, or source. HTML is rewritten so embedded images display and links open in a new window. Attachments can be listed and downloaded individually, and the original email can be exported to open in a native mail client. A JSON and HTTP API exposes the message list and parts.
MailCatcher is installed as a Ruby gem and requires Ruby 3.3 or newer. Ports and IPs can be changed from the command line, and an official Docker image is available. Integration guidance is included for Rails, Django, and PHP through a sendmail-compatible `catchmail` command.
Key features
- 01Catches all outgoing mail and stores it for display in the browser.
- 02Shows messages as HTML, plain text, or source.
- 03Lists attachments and allows downloading each part separately.
- 04Exports the original email for use in a native mail client.
- 05Updates instantly over WebSockets when supported, otherwise polls periodically.
- 06Provides a JSON and HTTP API for messages and their parts.
Use cases
- Testing password reset, signup, and notification emails during local development.
- Checking email output from Rails, Django, or PHP applications without sending real mail.
- Running a disposable mail catcher in Docker for CI or demo environments.
Quick start
- 1
Install MailCatcher with RubyGems
gem install mailcatcher - 2
Start MailCatcher
mailcatcher - 3
Open the web interface at http://127.0.0.1:1080/ and send mail via smtp://127.0.0.1:1025
Things to know
- Requires Ruby 3.3 or newer, and some gem dependencies may need build tools.
In collections
Topics
FAQ
- What is mailcatcher?
- A local SMTP server that catches outgoing email during development and shows it in a web interface. MailCatcher runs a simple SMTP server that catches every message sent to it and displays them in a web interface. You point your application's mail delivery at smtp://127.0.0.1:1025 instead of a real mail server, then open http://127.0.0.1:1080 to browse the messages that have arrived. It is aimed at developers who need to test outgoing email without delivering it to real recipients.
- Is mailcatcher free to use? What license does it have?
- mailcatcher is open source under the MIT license. Check the license terms before using it in commercial products.
- Is mailcatcher still maintained?
- Updated within 6 months. The last commit to mailcatcher was on Sep 16, 2026.
- What can I use mailcatcher for?
- Testing password reset, signup, and notification emails during local development. Checking email output from Rails, Django, or PHP applications without sending real mail. Running a disposable mail catcher in Docker for CI or demo environments.
- How do I install mailcatcher?
- Install MailCatcher with RubyGems: gem install mailcatcher Start MailCatcher: mailcatcher Open the web interface at http://127.0.0.1:1080/ and send mail via smtp://127.0.0.1:1025
- Where can I get mailcatcher?
- The source code and installation instructions are on GitHub: https://github.com/sj26/mailcatcher
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
A one-click installer that turns a fresh Ubuntu 22.04 machine into a complete self-hosted mail server with webmail, DNS, and backups.
A local SMTP server with a web interface for catching, viewing and testing emails during development.
A small, zero-dependency email testing tool that acts as an SMTP server, with a web UI and REST API to inspect captured mail.
A free, open-source local AWS emulator that lets you run AWS-shaped services on your machine with no account or auth token.
Runs Kubernetes clusters as Docker containers using vCluster, a lighter alternative to KinD with pause/resume and built-in load balancers.