How to Install MailCatcher on CentOS

MailCatcher is a special tool that helps developers to provide verification of emails sent by their attachments without having to wait for the email provider mail. It intercepts all emails and stores them for display. Supported as HTML and text messages.


First, you need to update the entire list of yum repositories and then install the gcc and g ++ compilers and MailCatcher dependencies (Ruby and SQlite)

sudo yum update
sudo yum -y install gcc gcc-c++
sudo yum -y install sqlite-devel ruby-devel

Install MailCatcher

<sudo gem install mailcatcher>

Launching MailCatcher

After installation, you can run mailcatcher –help to see what options are available. After that, start MailCatcher by running its mailcatcher –ip [your-vultr-ip-address] on your terminal.
Your result should look something like this:

root@install:~# mailcatcher --ip [your-vultr-ip-address]
Starting MailCatcher
==> smtp://[your-vultr-ip-address]:1025
==> http://[your-vultr-ip-address]:1080
*** MailCatcher runs as a daemon by default. Go to the web interface to quit

Search for http://[your-vultr-ip-address]:1080 and you will then see the MailCatcher interface. Configure your application to use the SMTP host of your Vultr IP and port 1025 and send some test emails. These emails will appear in the MailCatcher web interface.


If you don’t see the MailCatcher web interface, you might have to open port 1080 and enable the “http service” on your CentOS firewall.

Run the commands below and then try http://[your-vultr-ip-address]:1080 to access it again through your web browser

sudo firewall-cmd --zone=public --add-port=1080/tcp --permanent
sudo firewall-cmd --zone=public --add-service=http --permanent
sudo firewall-cmd --reload

MailCatcher can really simplify your development and testing workflow as it saves the email provider from intercepting and viewing emails. Try using it for the next application.

Was this article helpful?

Related Articles

Leave A Comment?