Skip to content
Gmail and Google Workspace · permanent error

502 5.5.1: command not recognized

Gmail does not know, or does not support, an SMTP command your client sent, and after too many of them it ends the session.

Gmail
Provider
Permanent (5xx)
Class
Sources checked
Author

At a glance

Code
502 5.5.1
Temporary or permanent
PermanentRefused for good: the message comes back to the sender, and resending it gets the same answer.
Who has to act
The sender. The fix is on the sending side: your domain, your server or your list.
What the server says
502 5.5.1 Unrecognized command.

What it means

Gmail answers 502 5.5.1 when a client sends a command it does not recognize or has not implemented. Google documents three wordings: 'Unimplemented command', 'Unrecognized command', and 'Too many unrecognized commands, goodbye', after which Gmail closes the connection. Typical sources are typos in hand-typed test sessions, clients that send commands Gmail did not advertise, and programs speaking another protocol, such as HTTP or IMAP, to an SMTP port. The command has to change; retrying it does not help.

Common causes

  • A typo or unsupported command in a manual or scripted SMTP session.
  • A client that uses an extension Gmail did not list in its EHLO reply.
  • A program speaking another protocol, such as HTTP or IMAP, to an SMTP port.

How to fix it

  1. 01Check the session log for the exact command Gmail refused.
  2. 02Use only standard SMTP commands and the extensions Gmail lists in its EHLO reply.
  3. 03Fix the port and protocol settings of the client or device.

Sources

What this page rests on, checked on 20 Oct 2026. The explanation is ours; the reply text is the server's.

  1. 503 5.5.1Command sent out of sequence.Your client sent Gmail an SMTP command at the wrong point in the conversation, such as the message before any recipient, so Gmail refused it.GmailPermanent
  2. 502Command not implemented.The server recognises the command but does not implement it, so it will not carry that command out in this session.StandardPermanent
  3. 5.5.1Invalid SMTP command.The sending software issued an SMTP command that the server does not support, or sent it at the wrong point in the conversation.StandardPermanent

All 108 Gmail codesEvery code in the wikiPaste your own bounce

Beat · paid monitoring

A heartbeat for your email.

Beat runs every check on this site on a schedule: 41 checks, 33 blacklists and real inbox placement. The moment something breaks, it tells you what broke, why it matters, and the exact fix.

example.comWatching
  • SPFpass
  • DKIMpass
  • DMARCp=none
  • Blacklists0 of 33

Illustrative. Your domain, every few hours.

Also from us:Pulse: your own sending infrastructureConsulting: $65/hr, no retainer