In my Laravel 5.4 app I want to send an email notification to the user when they signup I have set everything but not work and shown an exception like:
Cannot send message without a sender address
I am using mailtrap.
I have also run the artisan command php artisan config:cache
and php artisan cache:clear
This is my .env file:
MAIL_DRIVER=smtp
MAIL_HOST=smtp.mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=3e917ca6b3dabc
MAIL_PASSWORD=05abe282eca67f
MAIL_ENCRYPTION=tls
I ran into the exact same problem with Laravel 6.15.1.
As it turned out, you only need to delete these lines in .env
:
MAIL_FROM_ADDRESS=null
MAIL_FROM_NAME="${APP_NAME}"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With