1. Home
  2. SMTP codes
  3. Enhanced status codes
  4. Gmail 504 5.7.40
Permanent failure — do not retry unchanged

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 itGmail and Google Workspace
Basic code504: Command parameter not implemented (RFC)
Enhanced code5.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 temporaryPermanent (5xx)
Verifying the list prevents itNo

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

Registry and provider wording is quoted exactly; guidance is written by the SimpleVerifier Team.

SimpleVerifier Team · Last checked against the sources 2026-11-05

Clean your next list before it bounces

100 free email checks when you sign in with Google, no card. Then monthly plans from $9, or one flat price with fair use, never cut off.

100 free checks, no card Cancel anytime Secure payment by Stripe