SMTP 221 Closing Connection vs 250 OK
Both SMTP 221 (Closing Connection) and 250 (OK) 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, 250 means that the requested mail action has been completed successfully. This is the most common positive response in SMTP, returned after HELO/EHLO, MAIL FROM, RCPT TO, and DATA completion.
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 requested mail action has been completed successfully. This is the most common positive response in SMTP, returned after HELO/EHLO, MAIL FROM, RCPT TO, and DATA completion.
Khi bạn thấy mã này
After nearly every successful SMTP command — greeting, specifying sender, adding recipients, or completing message delivery. This is the standard success confirmation.
Cách khắc phục
No fix needed — the command was accepted. If a command that should succeed returns a different code, check the command syntax and server policies.
Sự khác biệt chính
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.
SMTP 250: The requested mail action has been completed successfully. This is the most common positive response in SMTP, returned after HELO/EHLO, MAIL FROM, RCPT TO, and DATA completion.
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.
You encounter 250 when after nearly every successful SMTP command — greeting, specifying sender, adding recipients, or completing message delivery. This is the standard success confirmation.
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 250 (OK): No fix needed — the command was accepted. If a command that should succeed returns a different code, check the command syntax and server policies.