Skip to content
Gmail and Google Workspace · permanent error

503 5.5.1: command 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.

Gmail
Provider
Permanent (5xx)
Class
Sources checked
Author

At a glance

Code
503 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
503 5.5.1 Bad sequence of commands.

What it means

SMTP commands come in a fixed order: EHLO, then MAIL FROM, then one or more RCPT TO, then DATA. Gmail received one out of turn and refused it. Google documents several wordings: a plain 'Bad sequence of commands', a longer note that a transaction command was issued out of sequence, and 'RCPT first', which means DATA arrived before any recipient was accepted. That last one often follows a session in which every RCPT TO was rejected and the client sent the message anyway. The fault lies in the sending software, and it repeats until that is fixed.

Common causes

  • A client that sends DATA after all its recipients were rejected.
  • Pipelining or custom code that sends commands before earlier replies arrive, and ignores failures.
  • A client that sends MAIL FROM a second time without finishing or resetting the transaction.

How to fix it

  1. 01Check the SMTP log of the failed session to see which command came out of order.
  2. 02If recipients were rejected, deal with those rejections first, since a message cannot go without a valid recipient.
  3. 03Fix or update the client so it waits for each reply and stops when a command fails.
  4. 04Use RSET to start a new transaction instead of sending MAIL FROM again.

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.1EHLO or HELO missing.Your client started sending mail commands to Gmail without first greeting it with EHLO or HELO, which SMTP requires.GmailPermanent
  2. 503 5.5.1DATA sent after BDAT.Your client began sending the message in BDAT chunks and then switched to DATA in the same transaction, which the CHUNKING extension does not allow.GmailPermanent
  3. 503Bad sequence of commands.The client sent a command at the wrong point in the conversation, for example message data before any recipient was accepted, or mail before logging in.StandardPermanent
  4. 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