developer | thinker | tinkerer

MailCatcher - Local SMTP Server

  • Tuesday, February 25 2014
  • tools

Recently I've been developing a lot of JIRA workflows and I wanted to be able to test the email delivery as well but didn't want to reconfigure our existing notifications to send to different people.

I considered setting up my own mail server but that seemed a bit heavy for what I needed. I just needed to verify the mail was sent...

Turns out MailCatcher does exactly this.

MailCatcher runs a super simple SMTP server which catches any message sent to it to display in a web interface.

MailCatcher requires Ruby but installation is a simple:

gem install mailcatcher

Then crank open your console and fire off 'mailcatcher' and it will return some info on what ports it is listening on:

C:\Users\jpriest\scripts\batch> mailcatcher
Starting MailCatcher
=> smtp://
  1. Crank open your browser and you will get a simple interface that allows you to view messages.
  2. Update your application with the SMTP information provided and you should be set!

Now when you send an email you should see it logged in the console as well as appear in the browser:

C:\Users\jpriest\scripts\batch> mailcatcher
Starting MailCatcher
=> smtp://
=> SMTP: Received message from '<>' (13273 bytes)
=> SMTP: Received message from '<>' (12982 bytes)

I also setup my local Railo mail to run through MailCatcher as well. I setup MailCatcher to be the first server and my 'real' mail server as the second. Then during development if I want to catch email locally I can crank up MailCatcher, and if it's not running Railo will fall back on the main mail server.

cf.Objective 2014 - Digging Into The Developer Toolbox You Got Your Mouse In My Virtual Desktop

More like this...