5.5.1 means a command came out of order or is not supported — a client or script that does not follow the SMTP conversation.
| Code | 5.5.1 |
| Meaning | Invalid command |
| Kind | Permanent failure — the sender gives up |
| Sent in reply to | With 500, 502 or 503 |
| What the sender does | Depends on the command; the message usually does not go |
| Defined in | RFC 3463 |
Paste your bounce
Paste the line with the code — or the whole bounce: we explain each code in it, say whether the sender will try again, and link the service’s own page where it has one. It is read in your browser; nothing is sent.
What to do
- Check the client or script: it sends commands in the wrong order, or ones the server does not support.
What each provider means by it
| Who | What they say |
|---|---|
| Gmail | 503 5.5.1 Bad sequence of commands, EHLO/HELO first, RCPT first, No DATA after BDAT; 502 5.5.1 Unimplemented or unrecognized command. |
| Exchange Server | Reports “send hello first” as 5.5.2. |
Sources
Checked on 27 September 2026 against these official sources:
- Simple Mail Transfer Protocol (SMTP) Enhanced Status Codes Registry — iana.org
- Gmail SMTP errors and codes — knowledge.workspace.google.com
- DSNs and NDRs in Exchange Server — learn.microsoft.com