How to get email working with Vagrant and MailCatcher

Recently I needed to send emails locally. My local dev environment uses Vagrant, so I researched some options and tried installing MailCatcher. I was able to successfully install MailCatcher and run it locally, however I couldn’t access it from my host machine. If I used curl on my virtual machine I could see the HTML for MailCatcher, but trying to visit the same URL from my host machine would result in a never ending page load.

The Solution

Luckily, if you configure your Vagrant using PuPHPet the process for setting up MailCatcher becomes infinitely easier! Follow the steps outlined below and enjoy testing emails in your local dev environment: