Test that your web app sends the correct transactional email by viewing caught messages at localhost:1080 during development.
Verify HTML email templates look right including both HTML and plain-text versions before going to production.
Automate email-sending tests by fetching caught messages as JSON from MailCatcher's built-in API.
Route PHP sendmail-based email through MailCatcher during development using the catchmail companion command.
Install as a standalone gem outside your project Gemfile, adding it to Gemfile can cause dependency conflicts.
MailCatcher is a small tool for developers who need to test whether their app sends emails correctly, without those emails actually going anywhere. It runs a local fake email server on your computer. Your app sends mail to that fake server just like it would to a real one, and MailCatcher catches every message and displays it in a simple web page at http://127.0.0.1:1080. No email ever leaves your machine. This is useful during development because you can see exactly what the app is sending, including the HTML version, the plain text version, and any attachments, without worrying about accidentally emailing real people or filling up an inbox. New messages appear instantly if your browser supports WebSockets, otherwise the page refreshes every 30 seconds. Installing it takes one command: gem install mailcatcher (Ruby must already be installed). Then you run mailcatcher and point your app's email settings at localhost port 1025 instead of your normal mail server. The README includes specific configuration snippets for Rails, PHP, and Django. A Docker image is also available for people who prefer to run it in a container. The README explicitly advises against adding MailCatcher to your project's Gemfile, because it can conflict with other gems your application depends on. The recommended approach is to install it as a standalone gem outside your project's dependency list. A companion command called catchmail makes it easier to route PHP's sendmail-based mail through MailCatcher, since PHP normally calls an external binary rather than connecting to an SMTP server directly. MailCatcher also exposes a simple API so you can fetch message data as JSON programmatically, which can be useful for automated testing.
← sj26 on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.