SMTP 221 Closing Connection vs 502 Command Not Implemented
SMTP 221 (Closing Connection) is a 2xx Positive Completion response, while 502 (Command Not Implemented) is a 5xx Permanent Negative response. 221 indicates that the server is closing the transmission channel. This is the normal response to the QUIT command, indicating a graceful end to the SMTP session. In contrast, 502 means 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.
Beschreibung
The server is closing the transmission channel. This is the normal response to the QUIT command, indicating a graceful end to the SMTP session.
Wann Sie es sehen
After sending the QUIT command at the end of a mail session. The server acknowledges the disconnect and the TCP connection will be closed.
Wie man es behebt
No fix needed — this is the expected response when ending an SMTP session. If you see this unexpectedly, the server may be shutting down or timing out idle connections.
Beschreibung
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.
Wann Sie es sehen
When using optional SMTP commands like VRFY, EXPN, or TURN that the server administrator has disabled, often for security or anti-spam reasons.
Wie man es behebt
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.
Wesentliche Unterschiede
221 is a 2xx Positive Completion response, while 502 is a 5xx Permanent Negative response.
SMTP 221: The server is closing the transmission channel. This is the normal response to the QUIT command, indicating a graceful end to the SMTP session.
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.
You encounter 221 when after sending the QUIT command at the end of a mail session. The server acknowledges the disconnect and the TCP connection will be closed.
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.
Wann welchen verwenden
For 221 (Closing Connection): No fix needed — this is the expected response when ending an SMTP session. If you see this unexpectedly, the server may be shutting down or timing out idle connections. 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.