Every two weeks I send out a newsletter containing lots of interesting stuff for the modern PHP developer. You can expect quick tips, links to interesting tutorials, opinions and packages. Want to learn the cool stuff? Then sign up now!

A package for testing mail in Laravel

Tighten has developed a very useful package for testing mail in Laravel.

Laravel’s current integration testing features make it easy to test that certain behaviors—visiting a route, filling out a form, etc.—will trigger certain responses. You can assert that a given event was fired, assert that the database ended up in a certain state, or even assert that a user would end up on a certain page.

But until now, you couldn’t easily test that a given piece of mail was sent. MailThief makes that possible.


A few months ago Adam Wathan, the author of the package, posted this video on his on blog on why and how he created the code that powers MailThief.

Freek Van der Herten is a partner and developer at Spatie, an Antwerp based company that specializes in creating web apps with Laravel. After hours he writes about modern PHP and Laravel on this blog. When not coding he’s probably rehearsing with his kraut rock band.