"Cannot send message without a sender address" in password reset in Laravel 7

Viewed 167

I'm following episode 37 of Laravel from scratch on Laracast.com. I'm running Laravel 7 on a Xampp stack.

I am testing a password reset with the standard workflow included in laravel. Screenshot

When I push the button I get an error message:

Swift_TransportException Cannot send message without a sender address http://localhost/L6/public/password/email

I am using a clean Laravel/ui project.

My .env looks like:

> MAIL_MAILER=log
MAIL_HOST=smtp.mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=tls
MAIL_FROM_ADDRESS=info@example.com
MAIL_FROM_NAME="${APP_NAME}"

I followed all possible suggestions I could find:

  • cleaning the config cache
  • change mail_mailer
  • add tls as mail_encription method
  • add a mail_from address

but nothing worked.

Any suggestions?

Kind regards,

Hubert

1 Answers

You need to clear cache in order to prevent this error in Laravel 7 . use the following commands one by one and your error will be solved .

- php artisan cache:clear
- php artisan route:cache
- php artisan view:clear
- php artisan config:cache

Hope it helped you .

Related