SMTP 354 Start Mail Input vs 421 Service Not Available
SMTP 354 (Start Mail Input) is a 3xx Positive Intermediate response, while 421 (Service Not Available) is a 4xx Transient Negative response. 354 indicates that the server is ready to receive the message body. The client should begin sending the email content (headers and body) and terminate with a single line containing only a period (CRLF.CRLF). 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 server is ready to receive the message body. The client should begin sending the email content (headers and body) and terminate with a single line containing only a period (CRLF.CRLF).
이 코드를 보게 되는 경우
After sending the DATA command. The server is now waiting for you to type or stream the email message, ending with a dot on its own line.
해결 방법
Send your message content followed by a line with just a period (.) to signal the end. If you get an error after this, check that your message does not contain a bare period on a line by itself within the body.
설명
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.
주요 차이점
354 is a 3xx Positive Intermediate response, while 421 is a 4xx Transient Negative response.
SMTP 354: The server is ready to receive the message body. The client should begin sending the email content (headers and body) and terminate with a single line containing only a period (CRLF.CRLF).
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.
You encounter 354 when after sending the DATA command. The server is now waiting for you to type or stream the email message, ending with a dot on its own line.
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 354 (Start Mail Input): Send your message content followed by a line with just a period (.) to signal the end. If you get an error after this, check that your message does not contain a bare period on a line by itself within the body. 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.