Gmail SMTP: '535 Username and Password not accepted'
@devsingh05▲ 10 net votes
Google does not accept your normal account password over SMTP. Turn on 2-Step Verification, then create an App Password (Google Account > Security > App passwords) and use that 16-character password with smtp.gmail.com port 587 (STARTTLS) or 465 (SSL). Workspace accounts may have app passwords disabled by the admin. For anything beyond a demo, a transactional email API is more reliable than personal Gmail.