Search code examples
phpemaillaravel-5laravel-maillaravel-notification

Laravel is sending mail using my old email configuration


I've changed my e-mail configuration in the .env file but when I'm trying to send a mail, it's using my old configuration.

I've tried some commands:

php artisan clear-compiled, php artisan cache:clear, and php artisan config:clear but it still sending using my old email.

I also tried to change the password of my old Gmail account, but my site is just sending mail with my old mail account.

I've noticed this:

This message may not have been sent by: [redacted]@gmail.com Learn more Report phishing

on the received mail.


Solution

  • If you're sending emails from a queue, try restarting the queue using php artisan queue:restart.

    This fixed the issue for me. I had tried composer dump-autoload, php artisan clear-compiled, php artisan cache:clear, and php artisan config:clear as mentioned above but they didn't fix the issue in my case.