SMTP

SMTP 221 Closing Connection vs 235 Authentication Successful

Both SMTP 221 (Closing Connection) and 235 (Authentication Successful) belong to the 2xx Positive Completion category. 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. Meanwhile, 235 means that the client has been successfully authenticated using the AUTH command. The server will now accept mail commands from this authenticated session.

คำอธิบาย

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.

คำอธิบาย

The client has been successfully authenticated using the AUTH command. The server will now accept mail commands from this authenticated session.

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

After submitting valid credentials via the AUTH command (LOGIN, PLAIN, or other SASL mechanism). The server has verified your identity and you can now send mail.

วิธีแก้ไข

No fix needed — authentication succeeded. If you expected this but received a different code, double-check your username, password, and the authentication mechanism.

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

1.

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.

2.

SMTP 235: The client has been successfully authenticated using the AUTH command. The server will now accept mail commands from this authenticated session.

3.

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.

4.

You encounter 235 when after submitting valid credentials via the AUTH command (LOGIN, PLAIN, or other SASL mechanism). The server has verified your identity and you can now send mail.

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

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 235 (Authentication Successful): No fix needed — authentication succeeded. If you expected this but received a different code, double-check your username, password, and the authentication mechanism.

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