Andrew Koper
Andrew Koper

Reputation: 7249

Google Workplace 535-5.7.8 username and password not accepted

I'm using Gmail for my application to send an email, but when it tried to send an email, Gmail returned the error message "Failed to authenticate on SMTP server with username " " using 3 possible authenticators. Authenticator LOGIN returned Expected response code 235 but got code "535", with the message "535-5.7.8 Username and Password not accepted." I am using Google Workplace so emails are sent with my business's domain name. There is a generic Gmail account for sending emails, and its Gmail SMTP config information is good in the application. Why isn't this working and what's the fix?

Upvotes: 3

Views: 5974

Answers (2)

Andrew Koper
Andrew Koper

Reputation: 7249

That Gmail address/account needs to allow "less secure app access," but there is an extra layer of complexity because it is a Google Workspace account, and the Workspace administrator has to enable that first.

  1. Go to https://workspace.google.com

  2. Login in with the administrator's email address and PWD enter image description here

  3. Go to "Security Setting" and, in "Less Secure Apps," click on "Allow users to manage their access to less secure apps" enter image description here

  4. You may also have to "Allow users to turn on 2-Step Verification" in "Security Settings" enter image description here

  5. Then, go to https://myaccount.google.com/u/1/security, log in with the email address and PWD sending the emails, go to "Security," and enable "Less secure app access" enter image description here

Upvotes: 8

zvi
zvi

Reputation: 4746

Since May 30, 2022 Google cancelled the "Less secure app access", so @Andew's answer is not relevant.

The update answer is to use App Passwords:

An App Password is a 16-digit passcode that gives a less secure app or device permission to access your Google Account. App Passwords can only be used with accounts that have 2-Step Verification turned on.

Upvotes: 2

Related Questions