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.

Description

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.

When You See It

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.

How to Fix

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.

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.

Key Differences

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.

When to Use Which

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.

Learn More