Ad

Problem When Sending A Local Mail With Maildev In Laravel 7

I'm stuck with a problem sending a local mail on the Maildev server from Laravel and I can't find the answer. Here is the code of my .env file :

MAIL_MAILER=smtp
MAIL_HOST=localhost
MAIL_PORT=1025
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
MAIL_FROM_ADDRESS=null
MAIL_FROM_NAME="${APP_NAME}"

and here's the error:

Swift_TransportException
Cannot send a message without a sender address
Ad

Answer

The error message says exactly what's wrong. You can't send emails without providing sender address. You need to provide account details like username, password and email address of that user.

Ad
source: stackoverflow.com
Ad