SMTP

SMTP 250 OK vs 334 Server Challenge

SMTP 250 (OK) is a 2xx Positive Completion response, while 334 (Server Challenge) is a 3xx Positive Intermediate 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, 334 means that the server is issuing an authentication challenge as part of the SASL authentication exchange. The response contains a Base64-encoded challenge that the client must decode and respond to.

説明

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 server is issuing an authentication challenge as part of the SASL authentication exchange. The response contains a Base64-encoded challenge that the client must decode and respond to.

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

During the AUTH command handshake. The server is prompting you for your username or password (Base64-encoded) as part of the multi-step authentication process.

解決方法

Respond with the appropriate Base64-encoded credentials. If authentication keeps failing after responding, verify your credentials and ensure you are using the correct SASL mechanism.

主な違い

1.

250 is a 2xx Positive Completion response, while 334 is a 3xx Positive Intermediate 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 334: The server is issuing an authentication challenge as part of the SASL authentication exchange. The response contains a Base64-encoded challenge that the client must decode and respond to.

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 334 when during the AUTH command handshake. The server is prompting you for your username or password (Base64-encoded) as part of the multi-step authentication process.

どちらをいつ使うか

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 334 (Server Challenge): Respond with the appropriate Base64-encoded credentials. If authentication keeps failing after responding, verify your credentials and ensure you are using the correct SASL mechanism.

詳しく見る