Trying to get Laravel 5 email to work

I know it’s working for you now @Vantheman6 but this is what worked for me in case it’s the same for someone else.

I added to my .env file the details of the mail service I am using. So make sure the following details

MAIL_DRIVER=smtp
MAIL_HOST=smtp.gmail.com
MAIL_PORT=587
[email protected]
MAIL_PASSWORD=MyPassword

in the .env file are accurate.

NOTE: Don’t forget to restart your server after editing the .env file so it will pick the new data that you put in there.

Clear config cache with below command:

php artisan config:cache

If you don’t restart your server, the .env file will still continue to present the old mail data to the app even though you have made changes that can cause this error.

Leave a Comment