SMTP Error Codes — Complete Reference
Every SMTP reply code you are likely to meet, what it actually means, and the specific fix. 36 codes covering connection, authentication, policy and delivery failures.
SMTP is a conversation. Your client issues a command, the server answers with a three-digit reply code and a line of text. When email fails, that reply is the single most useful piece of evidence you have — it tells you precisely which stage broke.
How to read an SMTP reply code
The first digit is the outcome class:
Success
The command succeeded and the server is ready for the next one.
Intermediate
The server accepted the command and is waiting for more input.
Temporary failure
The request failed but may succeed on retry. Mail stays queued.
Permanent failure
The request failed and will not succeed on retry. Mail bounces.
A reply often carries an enhanced status code too, such as
550 5.7.1 Service unavailable. The 5.7.1 part (RFC 3463) is far more
specific than the 550: the 7 means a security or policy condition, and the
final 1 narrows it to a delivery-not-authorised rejection. When both are present, the
enhanced code is the one to search for.
2xx — Success
The command succeeded and the server is ready for the next one.
| Code | Meaning | What it tells you | How to fix it |
|---|---|---|---|
| 220 | Service ready | The SMTP server has accepted the TCP connection and is ready to receive commands. This is the greeting banner. | The connection is healthy. If the session stalls here, the next command (EHLO or STARTTLS) is the one failing. |
| 221 | Service closing transmission channel | The server is closing the connection in response to QUIT. | Normal end of a session. No action needed. |
| 235 | Authentication successful | The credentials supplied in AUTH were accepted. | Authentication is working. Any later failure is about the message, not the login. |
| 250 | Requested mail action completed | The command succeeded. After DATA this means the server has accepted responsibility for the message. | Success. Note that 250 means accepted for delivery, not delivered to the inbox. |
| 251 | User not local; will forward | The recipient is not hosted here but the server will relay the message onward. | No action needed, though relaying can add delivery delay. |
| 252 | Cannot verify user, but will accept and attempt delivery | The server will not confirm whether the address exists — a common anti-harvesting measure. | Expected behaviour on many servers. It is not a guarantee the address is valid. |
3xx — Intermediate
The server accepted the command and is waiting for more input.
| Code | Meaning | What it tells you | How to fix it |
|---|---|---|---|
| 211 | System status or help reply | The server is returning status or help information in response to a HELP or NOOP style command. | Informational only. No action needed. |
| 214 | Help message | A response to the HELP command describing how to use the server. | Informational only. No action needed. |
| 334 | Server authentication challenge | The server is waiting for the next part of the AUTH exchange, usually a base64-encoded username or password. | Your client handles this automatically. A hang here usually means an unsupported AUTH mechanism. |
| 354 | Start mail input | The server accepted DATA and is waiting for the message body, terminated by a line containing only a period. | Normal. No action needed. |
4xx — Temporary failure
The request failed but may succeed on retry. Mail stays queued.
| Code | Meaning | What it tells you | How to fix it |
|---|---|---|---|
| 421 | Service not available, closing transmission channel | The server is shutting down, overloaded, or has decided to drop your connection — often rate limiting or a reputation block. | Retry later with backoff. If it is persistent, you are likely being throttled: reduce send rate, check the sending IP reputation, and confirm you are not on a blocklist. |
| 422 | Recipient mailbox is over quota | The recipient mailbox has exceeded its storage allowance. | Nothing you can fix at the sending end. The message will retry until the queue expires. |
| 431 | Not enough storage or out of memory | The receiving server is out of disk space or memory. | Transient server-side problem. Retry later. |
| 441 | No response from the recipient server | Your server connected onward but the destination did not answer. | Usually resolves on retry. Persistent failures point to a DNS or MX problem at the destination. |
| 442 | Connection dropped during transmission | The TCP connection was lost mid-delivery. | Check for network instability, aggressive firewalls, or a very low idle timeout on either side. |
| 450 | Mailbox unavailable (busy or temporarily blocked) | The mailbox exists but cannot accept mail right now — frequently a greylisting response. | Retry after a few minutes. Greylisting deliberately rejects the first attempt and accepts the retry. |
| 451 | Requested action aborted: local error in processing | The receiving server hit an internal error, or is deferring you for policy reasons such as rate limiting or SPF/DKIM checks still pending. | Retry with backoff. If repeated, verify SPF, DKIM and DMARC records and reduce concurrency. |
| 452 | Insufficient system storage / too many recipients | The server is low on storage or you exceeded the per-message recipient limit. | Split the recipient list into smaller batches and retry. |
| 454 | TLS not available / temporary authentication failure | STARTTLS could not be negotiated, or the authentication back end is temporarily unreachable. | Confirm the server certificate is valid and not expired, and that your client supports the offered TLS versions and ciphers. |
| 471 | Local error with the mail server | Often raised by anti-spam filters on the sending side. | Inspect your own mail server and content filter logs. |
5xx — Permanent failure
The request failed and will not succeed on retry. Mail bounces.
| Code | Meaning | What it tells you | How to fix it |
|---|---|---|---|
| 500 | Syntax error, command unrecognised | The server did not understand the command — sometimes caused by a line that is too long. | Usually a client bug or a non-SMTP service listening on the port. Confirm you are connecting to a real SMTP port. |
| 501 | Syntax error in parameters or arguments | A malformed email address or command argument, such as a missing angle bracket or a stray space. | Validate the From and To addresses. Strip whitespace and non-ASCII characters from the envelope addresses. |
| 502 | Command not implemented | The server does not support the command issued, for example VRFY or an unsupported ESMTP extension. | Harmless in most cases. Disable the unsupported feature in your client. |
| 503 | Bad sequence of commands | Commands arrived out of order — for example RCPT TO before MAIL FROM, or AUTH before EHLO. | Almost always a client bug. If you see it after STARTTLS, the client is not re-issuing EHLO after the TLS handshake. |
| 504 | Command parameter not implemented | Commonly returned when the requested AUTH mechanism is not supported. | Switch the authentication mechanism, typically to LOGIN or PLAIN over TLS. |
| 521 | Server does not accept mail | The host explicitly refuses all SMTP traffic — often a null MX or a non-mail server. | Verify the MX records for the domain and send to the correct host. |
| 530 | Authentication required | The server will not accept the message without a successful AUTH, or requires STARTTLS before AUTH. | Enable SMTP authentication in your client and supply valid credentials. If you see "5.7.0 Must issue a STARTTLS command first", enable TLS. |
| 535 | Authentication credentials invalid | The username or password was rejected. The single most common SMTP error. | For Gmail, Yahoo, iCloud, AOL and Outlook.com, use an app password rather than the account password. For SendGrid the username must be the literal word apikey. For Microsoft 365, confirm SMTP AUTH is enabled on the mailbox. |
| 541 | Message rejected by the recipient address | A spam filter at the destination refused the message. | Authenticate your domain with SPF, DKIM and DMARC, warm the sending IP, and review the content for spam triggers. |
| 550 | Mailbox unavailable / message rejected | The catch-all permanent failure: the address does not exist, the mailbox is disabled, relaying is denied, or a policy rejected the message. | Read the text after the code — it is the actual diagnosis. "No such user" means a bad address; "Relay access denied" means you are not authenticated; "Blocked using a blocklist" means the sending IP is listed. |
| 551 | User not local; please try a different path | The recipient is not on this server and it will not relay. | Send directly to the domain MX host listed in DNS. |
| 552 | Message size exceeds storage allocation | The message is larger than the mailbox quota or the server message size limit. | Compress or link to large attachments. Most providers cap messages at 10–35 MB after base64 encoding adds roughly 33%. |
| 553 | Mailbox name not allowed | The envelope sender address is invalid or not permitted — typically relaying with an unauthorised From address. | Make the From address match the authenticated account or a domain you have verified with the provider. |
| 554 | Transaction failed | A blanket rejection, usually from a reputation or content filter, and frequently seen as "554 5.7.1 Service unavailable; client host blocked". | Check the sending IP against major blocklists, publish SPF and DKIM, set up DMARC, and verify reverse DNS matches the HELO name. |
| 555 | MAIL FROM / RCPT TO parameters not recognised | The server does not support a parameter you supplied, such as SMTPUTF8. | Disable the unsupported ESMTP extension in your client. |
| 556 | Domain does not accept mail | The destination domain publishes a null MX record, declaring that it receives no mail. | The address cannot receive email. Remove it from your list. |
No code matches that search. Paste just the three-digit code (e.g. 550) or a word from the
server's message, or run a live SMTP test to see the exact reply.
The codes you will actually see
In practice, a handful of codes account for the overwhelming majority of real SMTP failures:
- 535 — credentials rejected. Nearly always an app password that was never generated. See the settings directory for your provider's requirement.
- 550 — message refused. Read the trailing text: bad address, relay denied, or a blocklist hit.
- 554 — reputation or content rejection. Fix with SPF, DKIM and DMARC.
- 421 — throttled or temporarily refused. Slow down and retry with backoff.
- 530 — authentication required, or STARTTLS must be issued first. Enable encryption and SMTP AUTH.
- 451 — greylisting or a deferred policy check. The retry usually succeeds.
Seeing a timeout instead of a code? That is not an SMTP error at all — the connection never reached the mail server. It is a blocked port or firewall. Read the SMTP ports guide to work out which port to use instead.
Frequently asked questions
Every SMTP command gets a three-digit reply. The first digit tells you the outcome: 2xx succeeded, 3xx needs more input, 4xx failed temporarily and will be retried, 5xx failed permanently and bounces. The second and third digits narrow down the cause, and the text after the code is usually the most useful part.
A 4xx is a soft failure: the server is telling you to try again later, and a sending server will normally retry for several days before giving up. A 5xx is a hard failure: the condition is permanent, no retry will help, and the message bounces immediately. Treat repeated 4xx responses as a 5xx — something structural is wrong.
Code 550 is a catch-all, so read the text that follows it. "No such user" means the address does not exist. "Relay access denied" means your session was never authenticated. "Blocked using a blocklist" means the sending IP is listed. "Message rejected due to policy" usually means failing SPF, DKIM or DMARC checks.
Code 535 means your credentials were rejected. Gmail, Yahoo, iCloud, AOL and Outlook.com all require an app password rather than the account password. SendGrid requires the literal username apikey. Postmark uses the Server API token for both fields. Microsoft 365 requires SMTP AUTH to be enabled on the mailbox.
Not quite. A 250 after the message body means the receiving server has accepted responsibility for the message. It may still be filed as spam, dropped by a policy filter, or bounced asynchronously minutes later. Accepted and delivered are different things.
Codes like 5.7.1 or 4.2.2 are enhanced status codes defined by RFC 3463. They appear alongside the three-digit reply and give far more precision. The first digit matches the reply class, the second identifies the subject (addressing, mailbox, network, security), and the third gives the specific condition — for example 5.7.1 is a policy or permission rejection.
See the exact code your server returns
Run a live SMTP test and get the server's own reply, not a guess.
Test SMTP Server