In this episode, we're diving into how to set up sending emails locally in Laravel, which is super useful during development. First, we talk about the various options Laravel gives us for email sending—there are quite a few—but for now, we focus on local development solutions.
We'll use a tool called HeLo (or something similar, like Mailhog) that catches outgoing emails and gives you an inbox right on your machine, so you don't accidentally send anything to real users while testing. You'll see how to configure your .env
file to use HeLo with the right SMTP host, port, and a test email address. We also mention Mailhog as a free alternative—so feel free to use whichever one suits you.
Afterwards, you'll see how to generate a basic example email in Laravel with the artisan make:mail command, set up a corresponding view (Blade file), and get it wired up.
We'll try sending our test email using Tinker in the terminal, and you'll be able to watch it come through in HeLo. Want to double check emails without a GUI inbox? We also show you how to log outgoing emails to the Laravel log file instead—just switch the mail driver and inspect the logs!
So by the end of this episode, you’ll have Laravel configured to send emails locally, either to a neat inbox or to your log files, and you’ll be ready to implement real email sending for production later. Perfect for painless email testing as you develop your app!