SMTP

SMTP 250 OK vs 421 Service Not Available

SMTP 250 (OK) is a 2xx Positive Completion response, while 421 (Service Not Available) is a 4xx Transient Negative response. 250 indicates 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. In contrast, 421 means that the SMTP service is not available and the server is closing the transmission channel. This may be sent as a greeting or during a session if the server needs to shut down.

설명

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.

이 코드를 보게 되는 경우

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

해결 방법

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

설명

The SMTP service is not available and the server is closing the transmission channel. This may be sent as a greeting or during a session if the server needs to shut down.

이 코드를 보게 되는 경우

When connecting to a mail server that is overloaded, undergoing maintenance, or shutting down. The server cannot handle your request right now.

해결 방법

Retry the connection after a delay. If the issue persists, check server status and resources (CPU, memory, disk). Rate limiting or greylisting may also trigger this response.

주요 차이점

1.

250 is a 2xx Positive Completion response, while 421 is a 4xx Transient Negative response.

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.

SMTP 421: The SMTP service is not available and the server is closing the transmission channel. This may be sent as a greeting or during a session if the server needs to shut down.

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.

5.

You encounter 421 when when connecting to a mail server that is overloaded, undergoing maintenance, or shutting down. The server cannot handle your request right now.

언제 어떤 것을 사용할지

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. For 421 (Service Not Available): Retry the connection after a delay. If the issue persists, check server status and resources (CPU, memory, disk). Rate limiting or greylisting may also trigger this response.

더 알아보기