close

[Solved] Laravel Failed to authenticate on SMTP server with username

Hello Guys, How are you all? Hope You all Are Fine. Today I get the following error Laravel Failed to authenticate on SMTP server with username in php. So Here I am Explain to you all the possible solutions here.

Without wasting your time, Let’s start This Article to Solve This Error.

How Laravel Failed to authenticate on SMTP server with username Error Occurs?

Today I get the following error Laravel Failed to authenticate on SMTP server with username in php.

How To Solve Laravel Failed to authenticate on SMTP server with username Error ?

  1. How To Solve Laravel Failed to authenticate on SMTP server with username Error ?

    To Solve Laravel Failed to authenticate on SMTP server with username Error I had the same issue, but when I ran the following command, it was ok:
    php artisan config:cache

  2. Laravel Failed to authenticate on SMTP server with username

    To Solve Laravel Failed to authenticate on SMTP server with username Error I had the same issue, but when I ran the following command, it was ok:
    php artisan config:cache

Solution 1

Change the .env file as follow

MAIL_DRIVER=smtp
MAIL_HOST=smtp.googlemail.com
MAIL_PORT=587
[email protected]
MAIL_PASSWORD=password
MAIL_ENCRYPTION=tls

And the go to the gmail security section ->Allow Less secure app access

Then run

php artisan config:clear

Refresh the site

Solution 2

I had the same issue, but when I ran the following command, it was ok:

php artisan config:cache

Summery

It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you? Thank You.

Also, Read

Leave a Comment