SMTP ERROR: Password command failed: 535-5.7.8 Username and Password not accepted. Learn more at535 5.7.8 https://support.google.com/mail/?p=BadCredentials b23sm12404631pft.162 - gsmtp SMTP Error: Could not authenticate. code example

Example 1: Error: Invalid login: 535-5.7.8 Username and Password not accepted. Learn more at 535 5.7.8 https://support.google.com/mail/?p=BadCredentials f2sm17674989iop.6 - gsmtp

This code is perfectly worked only need to change in gmail account to access lesssecureapps. https://myaccount.google.com/lesssecureapps ==> On

Example 2: SMTP ERROR: Password command failed: 535-5.7.8 Username and Password not accepted.

Change Google account access for less secure apps
Instructions in:
https://support.google.com/accounts/answer/6010255
https://support.google.com/accounts/answer/6009563

Tags:

Misc Example