How to Install MailCatcher on Ubuntu 20.04 (Complete Guide)

How to Install MailCatcher on Ubuntu 20.04
User
7 Min Read
2025/06/02

Okay, so here’s the deal: setting up MailCatcher on Ubuntu can streamline your email testing process and is easier than you might think.

You’ve got an app, and it needs to send emails. But you don’t wanna risk blowing up real users’ inboxes with test emails, right? That’s where MailCatcher comes in. This like this little local post office super simple. You send emails to it, and instead of sending them out into the world, it catches them and shows you what they look like. You get the HTML, the plain text, the complete bundle.

Anyway, setting it up on Ubuntu 20.04 is pretty straightforward. You’ll need to install a few things, but I’ll walk you through it step by step  nothing too complicated. And hey, if you don’t have a server yet, you might wanna check out Eldernode. We got some decent VPS options for Ubuntu that could come in handy.

Introduction to MailCatcher

MailCatcher’s a handy little tool when you wanna see exactly what’s going on with your emails before they go live. It shows you the full HTML, the plain text, and even the headers like the return path and all that stuff you sometimes forget to check. You can test links, preview attachments, and catch mistakes before they mess up your real users’ inboxes.

And the best part? It’s totally free. If you’re working on a tight budget or just don’t wanna risk spamming real people, MailCatcher’s a lifesaver. You can see if your messages are actually being sent, if your app’s firing off a flood of emails after a single click, and fix those issues before they turn into real problems.

MailCatcher Features

Alright, so here’s what MailCatcher can do for you:

It catches all the emails your app sends and keeps them in a neat little inbox you can check.

You’ll see the HTML version, plain text, and even the raw source of each email.

It rewrites the HTML so embedded images and links work properly you can even open links in new tabs.

You get a full list of attachments, and you can download them separately if you want.

Need to test in your own email client? You can download the full email and open it in Outlook, Thunderbird, whatever you use.

It gives you command line options to change the default ports or IP addresses for the SMTP and web server.

If your browser supports WebSockets, emails show up instantly; otherwise, it refreshes every 30 seconds.

It has a sendmail-like command that makes it super easy to use MailCatcher with PHP apps.

Oh, and you can use keyboard shortcuts to quickly switch between emails nice little touch.

Installing MailCatcher on Ubuntu 20.04 (or 18.04)

Alright, let’s get MailCatcher up and running. It’s really easy; just stick to these instructions.

First, you’ll need to install a few dependencies. Run these commands in your terminal:

apt-get update
apt-get install -y build-essential software-properties-common
apt-get install -y libsqlite3-dev ruby1.9.1-dev

If for some reason that last package doesn’t install, you can try this instead:

apt-get install -y libsqlite3-dev ruby-dev

That’s it for the setup next, we’ll install MailCatcher itself.

gem install mailcatcher

How to Use MailCatcher On Ubuntu 20.04

Alright, once MailCatcher’s installed, here’s how you get it running.

In your terminal, type:

mailcatcher --ip 0.0.0.0

(Change the IP to your server’s if you’re not running locally.)

That starts the server. Now just open your browser and go to:

http://your-server-ip:1080

You’ll see the MailCatcher interface pop up.

For your app, you’ll want to set the SMTP to:

smtp://127.0.0.1:1025

or whatever port you set when starting MailCatcher.

That’s it, really. It just works.

Conclusion

Look, just remember MailCatcher isn’t some hosted service you sign up for. You’ve gotta run it yourself. So yeah, you’ll need a server. Spin up a VPS, follow the steps in this guide, and you’re good to go. MailCatcher is built on Ruby and works exceptionally well on Ubuntu. That’s why I’m showing you how to set it up here. Let’s get it sorted.

0 out of 0 votes
Leave a Reply

Full Name*
Email*
Comment *

Calculate the value of 8 + 7 :

Save my name, email, and website in this browser for the next time I comment.
Recent Replies
Show More

We are by your side every step of the way

Think about developing your online business; We will protect it compassionately

We are by your side every step of the way

+8595670151

7 days a week, 24 hours a day