SMTP 521 Host Does Not Accept Mail vs 535 Authentication Failed
Both SMTP 521 (Host Does Not Accept Mail) and 535 (Authentication Failed) belong to the 5xx Permanent Negative category. 521 indicates that the host does not accept mail at all. This indicates the server exists but is explicitly configured to reject all incoming email messages. Meanwhile, 535 means that the authentication credentials provided are invalid. The username, password, or authentication mechanism was rejected by the server.
Description
The host does not accept mail at all. This indicates the server exists but is explicitly configured to reject all incoming email messages.
When You See It
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.
How to Fix
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.
Description
The authentication credentials provided are invalid. The username, password, or authentication mechanism was rejected by the server.
When You See It
After submitting incorrect credentials via the AUTH command. The username or password does not match any account on the server.
How to Fix
Double-check your username and password. If using an app password (e.g., Gmail, Outlook), ensure it is current and has not been revoked. Also verify the correct SASL mechanism (PLAIN, LOGIN, etc.).
Key Differences
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.
SMTP 535: The authentication credentials provided are invalid. The username, password, or authentication mechanism was rejected by the server.
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.
You encounter 535 when after submitting incorrect credentials via the AUTH command. The username or password does not match any account on the server.
When to Use Which
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. For 535 (Authentication Failed): Double-check your username and password. If using an app password (e.g., Gmail, Outlook), ensure it is current and has not been revoked. Also verify the correct SASL mechanism (PLAIN, LOGIN, etc.).