Gmail 504 5.7.40
Unrecognized authentication type
Gmail 504 5.7.40 means: unrecognized authentication type. It is a permanent failure, so do not retry it unchanged. Use an authentication mechanism Gmail supports. XOAUTH is no longer supported; use OAuth 2.0 (XOAUTH2).
Gmail’s exact wording
Quoted from Google Workspace Admin Help: Gmail SMTP errors and codes, checked 2026-11-05. Placeholders are Gmail’s own.
Reply text
Unrecognized authentication type. For more information, go to About SMTP error messages.
Reply text
XOAUTH is no longer supported. For more information, go to OAuth 2.0 Mechanism for Google Developers.
| Who sends it | Gmail and Google Workspace |
|---|---|
| Basic code | 504: Command parameter not implemented (RFC) |
| Enhanced code | 5.7.40: Gmail-specific, not in the IANA registry. Its subject digit puts it under 5.7.0 other or undefined security status. |
| Permanent or temporary | Permanent (5xx) |
| Verifying the list prevents it | No |
What the sender should do
Use an authentication mechanism Gmail supports. XOAUTH is no longer supported; use OAuth 2.0 (XOAUTH2).
Would verifying the list have prevented Gmail 504 5.7.40?
No
This reply is about your sending setup, the message or the receiving system, not about whether the address exists, so verifying the list will not prevent it.
Common questions
- What does Gmail 504 5.7.40 mean?
- Gmail 504 5.7.40 means: unrecognized authentication type. It is a permanent failure, so do not retry it unchanged. Use an authentication mechanism Gmail supports. XOAUTH is no longer supported; use OAuth 2.0 (XOAUTH2).
- Should I retry after Gmail 504 5.7.40?
- No. It is a permanent (5xx) failure, so the same message to the same address will fail again. Fix the cause first. Use an authentication mechanism Gmail supports. XOAUTH is no longer supported; use OAuth 2.0 (XOAUTH2).
- Would verifying my list have prevented Gmail 504 5.7.40?
- No. This reply is about your sending setup, the message or the receiving system, not about whether the address exists, so verifying the list will not prevent it.
Sources
- Google Workspace Admin Help: Gmail SMTP errors and codes (checked 2026-11-05)
- RFC 5321: Simple Mail Transfer Protocol, section 4.2.3 (reply codes) (checked 2026-11-05)
Registry and provider wording is quoted exactly; guidance is written by the SimpleVerifier Team.
SimpleVerifier Team · Last checked against the sources 2026-11-05