SMTP 235 Authentication Successful vs 521 Host Does Not Accept Mail
SMTP 235 (Authentication Successful) is a 2xx Positive Completion response, while 521 (Host Does Not Accept Mail) is a 5xx Permanent Negative response. 235 indicates that the client has been successfully authenticated using the AUTH command. The server will now accept mail commands from this authenticated session. In contrast, 521 means that the host does not accept mail at all. This indicates the server exists but is explicitly configured to reject all incoming email messages.
Описание
The client has been successfully authenticated using the AUTH command. The server will now accept mail commands from this authenticated session.
Когда вы это видите
After submitting valid credentials via the AUTH command (LOGIN, PLAIN, or other SASL mechanism). The server has verified your identity and you can now send mail.
Как исправить
No fix needed — authentication succeeded. If you expected this but received a different code, double-check your username, password, and the authentication mechanism.
Описание
The host does not accept mail at all. This indicates the server exists but is explicitly configured to reject all incoming email messages.
Когда вы это видите
When connecting to a server that has been intentionally configured to refuse all email, such as a domain that only sends but never receives mail.
Как исправить
Verify you are connecting to the correct mail server by checking the domain's MX records. If the domain truly does not accept mail, contact the recipient through an alternative channel.
Ключевые различия
235 is a 2xx Positive Completion response, while 521 is a 5xx Permanent Negative response.
SMTP 235: The client has been successfully authenticated using the AUTH command. The server will now accept mail commands from this authenticated session.
SMTP 521: The host does not accept mail at all. This indicates the server exists but is explicitly configured to reject all incoming email messages.
You encounter 235 when after submitting valid credentials via the AUTH command (LOGIN, PLAIN, or other SASL mechanism). The server has verified your identity and you can now send mail.
You encounter 521 when when connecting to a server that has been intentionally configured to refuse all email, such as a domain that only sends but never receives mail.
Когда что использовать
For 235 (Authentication Successful): No fix needed — authentication succeeded. If you expected this but received a different code, double-check your username, password, and the authentication mechanism. For 521 (Host Does Not Accept Mail): Verify you are connecting to the correct mail server by checking the domain's MX records. If the domain truly does not accept mail, contact the recipient through an alternative channel.