SMTP

SMTP 220 Service Ready vs 502 Command Not Implemented

SMTP 220 (Service Ready) is a 2xx Positive Completion response, while 502 (Command Not Implemented) is a 5xx Permanent Negative response. 220 indicates that the SMTP server is ready to begin the mail transaction. This greeting is the first response a client receives upon connecting, and it typically includes the server's hostname and software identificati 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.

描述

The SMTP server is ready to begin the mail transaction. This greeting is the first response a client receives upon connecting, and it typically includes the server's hostname and software identification.

何时出现

Immediately after establishing a TCP connection to the mail server on port 25, 465, or 587. This is the server's welcome banner confirming it is ready to accept commands.

如何修复

No fix needed — this confirms a successful connection. If you do not receive this greeting, check that the server is running, the port is correct, and no firewall is blocking the connection.

描述

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 using optional SMTP commands like VRFY, EXPN, or TURN that the server administrator has disabled, often for security or anti-spam reasons.

如何修复

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.

主要区别

1.

220 is a 2xx Positive Completion response, while 502 is a 5xx Permanent Negative response.

2.

SMTP 220: The SMTP server is ready to begin the mail transaction. This greeting is the first response a client receives upon connecting, and it typically includes the server's hostname and software identificati

3.

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.

4.

You encounter 220 when immediately after establishing a TCP connection to the mail server on port 25, 465, or 587. This is the server's welcome banner confirming it is ready to accept commands.

5.

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.

何时使用哪个

For 220 (Service Ready): No fix needed — this confirms a successful connection. If you do not receive this greeting, check that the server is running, the port is correct, and no firewall is blocking the connection. 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.

了解更多