Say a 25-person dental clinic sends appointment reminders from its practice software, and the copier at the front desk emails scanned consent forms into a records inbox. Both have worked for years. On a Tuesday the reminders stop going out and the copier starts printing an error sheet. The office manager sends us the log line from each, and it is the same line twice: 535-5.7.8 Username and Password not accepted.
Nobody changed DNS. Nobody opened the mail settings. The same account signs into Gmail in a browser without a murmur. That last detail is what makes this error confusing, and it is also the answer. The credentials are perfectly good for a person, and no longer acceptable coming from an application.
What the 535 reply is actually telling you
Google's list of Gmail SMTP errors and codes documents a 535 response carrying the text Username and Password not accepted, and it sends you to a sign-in troubleshooting page rather than to anything about mail. The reply a device writes into its log looks like this:
535-5.7.8 Username and Password not accepted. For more information, go to
535 5.7.8 https://support.google.com/mail/?p=BadCredentials
Read it as a statement about the handshake, not about the message. Nothing here was judged on content, reputation, SPF or DMARC, because the conversation never got as far as a message. The device opened a connection, offered a username and a password, and was told no. Everything downstream of the sign-in is beside the point until the sign-in works.
It helps to know what this error is not. An account locked for abuse answers with a 550 and its own wording in that same error table. A relay that does not recognise the sending address or IP address answers with a relay denial, also a 550. If what you are holding is a 535, the problem is the credential itself, the username format, or the fact that this kind of credential is no longer accepted at all.
Why a password that works in the browser gets refused
Google's admin documentation on moving off less secure apps now states the end position plainly: Google Workspace accounts do not support third-party apps or devices that ask you to sign in with your Google Account username and password, and those apps have to use OAuth instead. The protocols it names are the ones every office device speaks: IMAP, POP, SMTP, CalDAV and CardDAV.
This was a long wind-down rather than a surprise. Google announced it on the Workspace Updates blog in September 2023, with a first cutoff of 30 September 2024, and the date moved more than once before the switch was finally thrown. The practical result is easy to state. A device whose setup screen offers nothing but a server, a port, a username and a password has a small number of ways to keep sending, and the account password is not one of them.
Which is why the fix is never "reset the password and try again". It is choosing the right sending path for that particular device, and only then entering a credential.
The four ways Google will let an application send
Every device we untangle ends up in one of these four rows. Decide the row first. Most of the 535 errors we are called about are a copier pointed at smtp.gmail.com because that is what the first search result said, when the relay was the right answer for it from the start.
| Sending path | Server and port | What it needs | When we choose it |
|---|---|---|---|
| Sign in with Google (OAuth 2.0) | smtp.gmail.com, port 587 with TLS | The app has to support OAuth. Somebody signs in once and grants access | Every mail client, and anything written in the last few years. This is the default |
| App password | smtp.gmail.com, port 587 with TLS or 465 with SSL | 2-Step Verification on that account, then a 16-character code used in place of the password | A device with one password field and no OAuth option, such as an older scanner |
| SMTP relay, IP authentication | smtp-relay.gmail.com, port 587 with TLS | The sending machine's static IP address registered in the relay setting, which lives at the top-level organisation | Servers, appliances and line-of-business software on a fixed address that must reach outside recipients |
| Restricted Gmail SMTP server | aspmx.l.google.com | No authentication at all | Internal notifications only, where every recipient is on your own Google Workspace domain |
Two notes on the relay row, both from Google's own relay documentation. Without TLS you cannot use SMTP authentication at all and have to authenticate by IP address, so the port and encryption choice is not cosmetic. And the relay accepts up to 100 recipients in a single SMTP transaction, which is the limit that trips payroll and invoicing jobs that were written to send one message to a long list.
Fixing it on a Workspace account, in order
- Name the device and pick its row before changing a single setting. A mail client on a laptop is OAuth. A ten-year-old copier is an app password or the relay. A server on a static address is the relay.
- If the app supports OAuth, stop configuring and re-add the account. Google's own transition guidance for mail clients is to remove the account and add it again choosing Sign in with Google, so the app receives a token rather than a password. Nothing else has to change.
- If it does not, turn on 2-Step Verification for that account first. The app password page only exists on an account that has 2SV, which is why the setting people look for appears to be missing. Google also lists the cases where the option will not appear at all: 2-Step Verification set up with security keys only, an account that belongs to an organisation, or an account with Advanced Protection.
- Generate the app password and use it as the password. It is a 16-character code tied to that one account. Paste it where the account password used to go, and leave the account password alone.
- Check the username field. Google documents it as the full email address, so
reminders@yourdomain.comand notreminders. A local part on its own produces the same 535 as a wrong password, and it is the first thing we look at. - Match the port to the encryption. Google pairs port 587 with TLS and port 465 with SSL. In our own work, the commonest configuration mistake behind a 535 that will not clear is 465 set with STARTTLS, or 587 set with implicit SSL, on a device whose menu lets you choose both independently.
- If the account is in the Advanced Protection Program, change the plan. Google blocks apps that rely on app passwords for those users and revokes the existing ones at enrolment. That device belongs on the relay or on OAuth, and no amount of regenerating will help.
For a scanner that has to go through an app password, the working configuration is this short:
Server: smtp.gmail.com
Port: 587
Security: TLS (STARTTLS)
Username: reminders@yourdomain.com
Password: the 16-character app password
Once it sends again, check that it authenticates
A device that has started sending is not finished. Mail that leaves through Google's servers is covered by the include most Workspace domains already publish, and the clinic in the example has it:
yourdomain.com. 3600 IN TXT "v=spf1 include:_spf.google.com ~all"
Two things still go wrong after a successful sign-in. The first is a device that signs in as one account and writes a different address into the From header, which passes SMTP and then fails DMARC alignment at the recipient. The second is a relay that was set up for a machine whose IP address later changed, which produces a relay denial rather than a 535 and gets diagnosed as the same problem for a week. Send one real message to an outside address and read what the receiving end says about SPF, DKIM and alignment before you call the job done.
If this device is going to carry volume, the per-day ceilings matter as much as the credential. We wrote up where those limits sit in Google Workspace sending limits, and the routing side, including Send mail as, in SMTP relay and Send mail as.
Why it comes back three months later
The 535 that returns on its own is almost always a credential that something else revoked. Google's account help says app passwords are revoked when you change your Google Account password, and the admin documentation for resetting a user's password says the same thing from the other side: the application-specific passwords are revoked and have to be generated again. A quarterly password rotation, or one helpful admin resetting a password after a phishing scare, silently stops every device signed in with an app password on that account.
A password change also invalidates OAuth access and refresh tokens, so the OAuth devices come back with their own sign-in prompt at the same moment. That is the cluster of tickets on the Monday after a reset, and it is normal rather than a sign that something is broken.
Two habits remove most of the repeat visits. Do not hang business sending off a human being's account, because an app password dies with the person's offboarding and the invoices stop the week they leave. And keep a short list of what holds a credential for the domain, with the account and the path each one uses, so the next password reset comes with a known list of things to reconnect instead of a week of discovery.
How Guanacos Tech helps
When a client calls about a 535, we start by inventorying what sends mail for the domain, because the copier is rarely alone. Then we put each sender on the path it should have been on, move the ones that matter off personal accounts, and confirm with a real message that SPF, DKIM and alignment all pass on the way out. If a device, an application or a line-of-business system on your domain has stopped sending and you want it sorted properly rather than patched, our Google Workspace consultants can take it from the inventory. A 30-minute call is enough to say which sending path each one needs and what will break next time somebody resets a password.
Sources
- Google Workspace Admin Help: Gmail SMTP errors and codes
- Google Workspace Admin Help: Transition from less secure apps to OAuth
- Google Workspace Updates (September 2023): third-party apps that use only a password will no longer be supported
- Google Account Help: Sign in with app passwords
- Google Workspace Admin Help: Send email from a printer, scanner, or app
- Google Workspace Admin Help: Route outgoing SMTP relay messages through Google
- Google Workspace Admin Help: Reset a user's password
- Google Account Help: Common questions with the Advanced Protection Program
- Google Workspace Admin Help: Automatic OAuth 2.0 token revocation upon password change