A new Homestead base box has been released: Version 1.1.0. This release includes a new local mail handing system named Mailhog. The grunt-cli npm package is now installed globally, OPcache is now always invalidated, and finally we added some package-cleanup to the build process to lower the download size of the final compressed base box.

Long time Homestead users may remember that it previously supported the Ruby application, MailCatcher. By moving from MailCatcher to Mailhog the installation and configuration is easier than ever before.

They talk briefly about the steps needed to upgrade to Mailhog from MailCatcher and how to update your Homestead environment to take advantage of this latest change.

On Codeception.com an tutorial has been posted showing you how to use PHPUnit to test emails - verifying that your application emails are being sent with the help of a third-party service.

So how do you check that your applications sends email correctly? It looks like dealing with emails is always a challenge. How would you verify that email message is formatted and delivered correctly, without actually sending them to your clients? That's the first question. And the second question is: how can we automate testing of emails? For both questions we have an answer.

To answer the first, they recommend using a service like Mailtrap or Mailcatcher (the one they use for the post) to receive the emails for evaluation. They help you get both PHPUnit and the popular Guzzle HTTP library installed to help with resting against Mailcatcher's REST API. The example test is also included, showing a few methods that connect to the API, get the most recent messages and clear the list when it's complete. Assertions like assertEmailIsSent, assertEmailHtmlContains and assertEmailSenderEquals show how to test the message results that come back for validity.