SMTP

SMTP 220 Service Ready vs 221 Closing Connection

Both SMTP 220 (Service Ready) and 221 (Closing Connection) belong to the 2xx Positive Completion category. 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 Meanwhile, 221 means 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.

คำอธิบาย

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 server is closing the transmission channel. This is the normal response to the QUIT command, indicating a graceful end to the SMTP session.

เมื่อคุณพบเห็น

After sending the QUIT command at the end of a mail session. The server acknowledges the disconnect and the TCP connection will be closed.

วิธีแก้ไข

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.

ความแตกต่างหลัก

1.

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

2.

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.

3.

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.

4.

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.

ควรใช้อันไหนเมื่อไร

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 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.

เรียนรู้เพิ่มเติม