SMTP

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.

Description

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

Quand vous le voyez

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

Comment résoudre

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.

Description

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.

Quand vous le voyez

After nearly every successful SMTP command — greeting, specifying sender, adding recipients, or completing message delivery. This is the standard success confirmation.

Comment résoudre

No fix needed — the command was accepted. If a command that should succeed returns a different code, check the command syntax and server policies.

Différences clés

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

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 250 when after nearly every successful SMTP command — greeting, specifying sender, adding recipients, or completing message delivery. This is the standard success confirmation.

Quand utiliser lequel

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.

En savoir plus