Install Mailcatcher on Laravel Homestead

Update – October 18th 2014:

The wonderful Chris Fidao noted in the comments that if you’re not using Laravel Homestead and are using a different box, you may need to install the build-essential package too. You can do that with:

sudo apt-get install build-essential

After that’s installed the instructions below should be fine.


If you’re looking to debug outbound email easily, then mailcatcher will be a life saver for you. It’ll give you a nice interface to view outbound emails:

Mailcatcher

To install it, ssh to your box and follow these steps:

sudo apt-get install ruby-dev libsqlite3-dev

Once that’s installed, you can install the gem with this command:

sudo gem install mailcatcher

After mailcatcher is installed, you can run the program with:

mailcatcher --http-ip 0.0.0.0

If you’ve using Vagrant then you’ll need to forward port 1080 from the guest to the host machine as well.