SMTP 502 Command Not Implemented vs 503 Bad Sequence
Both SMTP 502 (Command Not Implemented) and 503 (Bad Sequence) belong to the 5xx Permanent Negative category. 502 indicates that the command is recognized by the SMTP specification but is not implemented on this server. The server understands the command but has chosen not to support it. Meanwhile, 503 means that the commands were sent in the wrong order. SMTP requires a specific command sequence (EHLO, MAIL FROM, RCPT TO, DATA) and this error indicates a step was skipped or repeated.
Description
The command is recognized by the SMTP specification but is not implemented on this server. The server understands the command but has chosen not to support it.
When You See It
When using optional SMTP commands like VRFY, EXPN, or TURN that the server administrator has disabled, often for security or anti-spam reasons.
How to Fix
Use an alternative approach — for example, if VRFY is disabled, send a test email instead of verifying the address. Check the server's EHLO response for supported extensions.
Description
The commands were sent in the wrong order. SMTP requires a specific command sequence (EHLO, MAIL FROM, RCPT TO, DATA) and this error indicates a step was skipped or repeated.
When You See It
When sending DATA before RCPT TO, or MAIL FROM before EHLO. The server enforces the correct SMTP command sequence and you have sent a command out of order.
How to Fix
Follow the proper SMTP command sequence: EHLO/HELO first, then MAIL FROM, then RCPT TO (one or more), then DATA. Reset with RSET if you need to start over.
Key Differences
SMTP 502: The command is recognized by the SMTP specification but is not implemented on this server. The server understands the command but has chosen not to support it.
SMTP 503: The commands were sent in the wrong order. SMTP requires a specific command sequence (EHLO, MAIL FROM, RCPT TO, DATA) and this error indicates a step was skipped or repeated.
You encounter 502 when when using optional SMTP commands like VRFY, EXPN, or TURN that the server administrator has disabled, often for security or anti-spam reasons.
You encounter 503 when when sending DATA before RCPT TO, or MAIL FROM before EHLO. The server enforces the correct SMTP command sequence and you have sent a command out of order.
When to Use Which
For 502 (Command Not Implemented): Use an alternative approach — for example, if VRFY is disabled, send a test email instead of verifying the address. Check the server's EHLO response for supported extensions. For 503 (Bad Sequence): Follow the proper SMTP command sequence: EHLO/HELO first, then MAIL FROM, then RCPT TO (one or more), then DATA. Reset with RSET if you need to start over.