Skip to content

mailcatcher

Local SMTP server with a web inbox for testing app email during development

Permissive (OSI) · mit
  • macOS
  • Linux
  • CLI

Listed by , founder & editor

52

Health

Slowing

Overview

Stars

6,783

Last commit

14 days ago

Nov 2026

Repository age

16 years

since Oct 2010

Latest version

v0.10.0

May 2024

Contributors

–

3 active in 90 days

Releases

0

last 12 months

Docker pulls

7.2M

sj26/mailcatcher

Language

Ruby

MailCatcher runs a small SMTP server that accepts every message sent to it and stores it for display in a web interface. You point your app at smtp://127.0.0.1:1025, then open http://127.0.0.1:1080 to read what arrived. Nothing is delivered to real recipients.

The web view shows the HTML, plain text and raw source of each message. It rewrites HTML so inline images display and links open in a new window. Attachments are listed and can be downloaded one by one, and you can download the original message to open in a mail client. New mail appears instantly in browsers with WebSockets, and keyboard shortcuts move between messages.

It is a Ruby gem, installed with gem install and started with the mailcatcher command. It needs Ruby 3.3 or newer and runs as a background daemon unless you ask for the foreground. A catchmail command works like sendmail, which helps with PHP. Options set IPs, ports, an HTTP path prefix and a cap on stored messages. A Docker image is available and the license is MIT. It is a free, self-hosted stand-in for hosted email testing services.

Who it's for

Web developers testing transactional email locally

Every message your app sends lands in one inbox you can inspect, with no risk of mailing real users.

Skip if: You need to check rendering across many real email clients, which needs a dedicated preview service.

PHP developers who rely on sendmail

The catchmail command stands in for sendmail so PHP mail goes straight to the local inbox.

Skip if: Your app already talks SMTP and you want a tool bundled in your existing container setup.

Teams running a shared staging environment

Docker support and configurable IPs, ports and path prefix let you run one inbox for the team.

Skip if: You need login, per-user inboxes or long-term message storage.

The problem it solves

When you build features that send email, you need to see the messages without mailing real people. Configuring a real mail server for testing is slow and risky. MailCatcher gives you a throwaway SMTP endpoint and a browser inbox.

Strengths

  • Setup is two commands: gem install mailcatcher, then mailcatcher
  • Shows HTML, plain text and source views, with inline images rendered
  • Lists attachments and lets you download each part or the original message
  • catchmail works as a sendmail replacement for PHP
  • Docker image available; MIT license

Trade-offs

  • Requires Ruby 3.3 or newer, and some gems need build tools
  • Should not be added to an application's Gemfile because of gem conflicts
  • No releases in the past year, though commits continue
  • Meant for development, so no authentication or per-user inboxes

Self-host mailcatcher

Self-hostable
Yes
Docker image
sj26/mailcatcher

Frequently asked questions

Is MailCatcher free?

Yes. It is released under the MIT license and costs nothing to run.

Can I self-host it?

Yes. It runs on your own machine or server, and a Docker image is available.

Which platforms does it run on?

It runs on Linux and macOS through Ruby, and there is a Homebrew formula.

Which ports does it use?

SMTP listens on 1025 and the web interface on 1080 by default. Command line options change both.

Does it send mail to real recipients?

No. It catches messages and shows them in the web interface only.

Similar tools in Developer utilities

MailHog

Developer utilities

Local SMTP server with a web inbox for developers testing outgoing email

16k 1.2k 4 years ago Dormant MIT

glow

Developer utilities

Terminal Markdown reader that browses local files and renders documents with styling

28k 825 2 months ago Slowing MIT

JADX

Developer utilities

Decompiler that turns Android APK and Dex files into readable Java, with CLI and GUI

52k 6k today Thriving Apache-2.0

it-tools

Developer utilities

Self-hostable web app of small utilities for developers and IT staff

41k 5.6k 9 months ago Dormant GPL-3.0

atuin

Developer utilities

Shell history replacement with SQLite storage and encrypted sync for terminal users

33k 1.1k today Thriving MIT

OmniTools

Developer utilities

Self-hosted collection of browser-based file, image, PDF and data tools

11k 774 31 days ago Slowing MIT