Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot send message without a sender address in laravel 5.4

Tags:

php

laravel

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
like image 583
Shahid Hussain Avatar asked Jan 07 '19 09:01

Shahid Hussain


1 Answers

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}"
like image 50
Ver Avatar answered Nov 29 '22 02:11

Ver