Search
 
SCRIPT & CODE EXAMPLE
 

PHP

Failed to authenticate on SMTP server with username

This will not work as of May 30, 2022 checkout here https://support.google.com/accounts/answer/6010255?hl=en&authuser=6 Thanks @sarout for pointing this out.

Did you turn on the "Allow less secure apps" on? go to this link

https://myaccount.google.com/security#connectedapps

Take a look at the Sign-in & security -> Apps with account access menu.

You must turn the option "Allow less secure apps" ON.

If is still doesn't work try one of these:

Go to https://accounts.google.com/UnlockCaptcha , and click continue and unlock your account for access through other media/sites.

Use double quote in your password: "your password"

And change your .env file

MAIL_DRIVER=smtp
MAIL_HOST=smtp.gmail.com
MAIL_PORT=587
MAIL_USERNAME=dianexxxxx@gmail.com
MAIL_PASSWORD=xxxxxx
MAIL_ENCRYPTION=tls
because the one's you have specified in the mail.php will only be used if the value is not available in the .env file.
Comment

PREVIOUS NEXT
Code Example
Php :: delete_user hook in wordpress 
Php :: php array all keys empty 
Php :: delete image s3 laravel 
Php :: symfony password 
Php :: laravel form validation 
Php :: laravel get subdomain 
Php :: php change array into comma delimited string 
Php :: laravel 8 Target class [FormController] does not exist. 
Php :: laravel with has 
Php :: laravel-socialite-invalidstateexception 
Php :: upload pdf file in laravel 
Php :: validation not exists with this id laravel 
Php :: laravel migration change column default 
Php :: random array php 
Php :: php run localhost 
Php :: laravel blade form old value 
Php :: time in php 
Php :: install laravel in ubuntu 20.04 
Php :: sum of columns laravel eloquent 
Php :: session variable in laravel 
Php :: how to change date formate in laravel 
Php :: startsWith() and endsWith() functions in PHP 
Php :: change php version in linux 
Php :: carbon diff 
Php :: php convert object to array nested 
Php :: how to find total rows fetched php pdo 
Php :: round up built in function php 
Php :: how to limit word in php 
Php :: php string parse with separator explode 
Php :: php string underscore into camelcase 
ADD CONTENT
Topic
Content
Source link
Name
5+4 =