Redirecting Test Emails Safely in Laravel
A small Laravel feature that prevents a big headache: how Mail::alwaysTo() keeps staging and demo environments from accidentally emailing real users.
3 articles tagged email.
A small Laravel feature that prevents a big headache: how Mail::alwaysTo() keeps staging and demo environments from accidentally emailing real users.
When doing any sort of non-trivial development, sooner or later you’ll likely end up having to send emails from your application. Email is a key part of many application for things like event notifications or user account verification. Testing that the right mails get sent at the right times can often be more hassle than it really should be. Fortunately, a tool called Mailcatcher exists to make this process much easier.
Character encoding in PHP can be fun at the best of times. Trying to send a non-ASCII character in a html email – a euro symbol, for example – can be just such one of those times.