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.

Mô tả

The server is closing the transmission channel. This is the normal response to the QUIT command, indicating a graceful end to the SMTP session.

Khi bạn thấy mã này

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

Cách khắc phục

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.

Mô tả

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

Khi bạn thấy mã này

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.

Cách khắc phục

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

Sự khác biệt chính

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.

Khi nào dùng cái nào

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.

Tìm hiểu thêm