Are you aware of the log mail driver?
If you modify your .env file on your dev environment and set
MAIL_DRIVER=log
Laravel will now write all mails to the storage/logs/laravel.log file instead of sending the mail for real.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hi,
I'm kind a new to laravel.
I'm currently creating a brand new laravel application and I'm trying to implement the following: Depending on the environment (development, test or production) I want to change:
a. The subject of an email (eg: to prefix the current environment) b. Change the to email address to prevent sending emails to real users on an development environment.
I'm using Laravel 5.3.20.
Thanks,
Koen
Please or to participate in this conversation.