SMTP

SMTP 220 Service Ready vs 354 Start Mail Input

SMTP 220 (Service Ready) is a 2xx Positive Completion response, while 354 (Start Mail Input) is a 3xx Positive Intermediate response. 220 indicates that the SMTP server is ready to begin the mail transaction. This greeting is the first response a client receives upon connecting, and it typically includes the server's hostname and software identificati In contrast, 354 means 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).

説明

The SMTP server is ready to begin the mail transaction. This greeting is the first response a client receives upon connecting, and it typically includes the server's hostname and software identification.

このコードが表示される場合

Immediately after establishing a TCP connection to the mail server on port 25, 465, or 587. This is the server's welcome banner confirming it is ready to accept commands.

解決方法

No fix needed — this confirms a successful connection. If you do not receive this greeting, check that the server is running, the port is correct, and no firewall is blocking the connection.

説明

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.

主な違い

1.

220 is a 2xx Positive Completion response, while 354 is a 3xx Positive Intermediate response.

2.

SMTP 220: The SMTP server is ready to begin the mail transaction. This greeting is the first response a client receives upon connecting, and it typically includes the server's hostname and software identificati

3.

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

4.

You encounter 220 when immediately after establishing a TCP connection to the mail server on port 25, 465, or 587. This is the server's welcome banner confirming it is ready to accept commands.

5.

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.

どちらをいつ使うか

For 220 (Service Ready): No fix needed — this confirms a successful connection. If you do not receive this greeting, check that the server is running, the port is correct, and no firewall is blocking the connection. 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.

詳しく見る