This page lists all **enhanced SMTP status codes** returned by the **SMTP API**.

You typically need to explicitly handle:

- **4xx** - Temporary failures (retry recommended)
- **5xx** - Permanent failures (request must be corrected before retrying)

Codes in the **2xx** and **3xx** range represent **normal protocol states** and are generally handled **automatically** by SMTP client libraries.

## 2xx - Success

| Status code | SMTP response message | Command | Description |
|-----------|----------------------|---------|-------------|
| `220 2.0.0` | Ready to start TLS | `STARTTLS` | TLS handshake is ready to begin. The server accepted the `STARTTLS` command and the client should now initiate TLS negotiation. |
| `221 2.0.0` | Bye | `QUIT` | Session ended normally. The server acknowledged the client's `QUIT` command to close the connection. |
| `235 2.7.0` | Authentication successful | `AUTH` | The client provided valid credentials via one of `AUTH` command mechanism and is now authenticated. |
| `250 2.0.0` | OK | `RSET` | Transaction state has been reset by `RSET` command. Any in-progress (`MAIL FROM` / `RCPT TO` / `DATA`) state is cleared. |
| `250 2.0.0` | OK | `NOOP` | Keep-alive acknowledged by `NOOP` command. The server is still active and the connection is healthy. |
| `250 2.1.0` | Sender <address> OK | `MAIL FROM` | The sender address was accepted by `MAIL FROM` command. The server validated the email address format and is ready to accept recipients. |
| `250 2.1.5` | Recipient <address> OK | `RCPT TO` | The recipient address was accepted by `RCPT TO` command. The server validated the email address format and added it to the recipient list. |
| `250 2.6.0` | Message queued as `<message_id>` | `DATA` | The message body was successfully received and processed after `DATA` command. Server returned UUID by which message can be tracked in the system. |

Note
The `<message_id>` is a unique identifier assigned by the Infobip SMTP API to each accepted message. When retrieving delivery reports, you can use the `<message_id>` to identify which report belongs to which original message.

## 3xx - Intermediate

| Status code | SMTP response message | Command | Description |
|-----------|----------------------|---------|-------------|
| `354` | End data with <CR><LF>.<CR><LF> | `DATA` | The server is ready to receive the message body on `DATA` command. The client should send the email content and terminate it with a line containing a single dot. |

## 4xx - Temporary failures

**Temporary failures** indicate that the request was valid but **could not be processed** at this time.

| Status code | SMTP response message | Command | Description |
|-----------|----------------------|---------|-------------|
| `421 4.3.0` | Mail system failure, closing transmission channel | Any | A temporary internal error occurred. The system is protecting itself by closing the connection. The client should retry after a delay. |
| `421 4.3.2` | Too many connections, try again later | Connection | The server has reached its maximum total connection limit. The client should retry after a delay. |
| `421 4.3.2` | Client connection limit reached | Connection | The client's IP address has too many simultaneous connections open. The client should reuse the opened connections or retry after a delay. |
| `421 4.3.2` | Service not available | `DATA` | The downstream processing service is temporarily unavailable. The client should retry after a delay. |
| `421 4.4.0` | Problem attempting to execute commands. Please try again later. | Any | An I/O error occurred while the server was processing the command. The connection will be closed. The client should retry after a delay. |
| `421 4.4.2` | Timeout waiting for the client | Any | The client took too long to send the next command. The server timed out and is closing the connection. The client should ensure commands are sent promptly. |
| `421 4.4.2` | Timeout during DATA | `DATA` | The client took too long to transmit the message body. The server timed out and is closing the connection. The client should ensure commands are sent promptly. |
| `421 4.4.2` | Connection reset during DATA | `DATA` | The TCP connection was unexpectedly reset by the client while the server was reading the message body. The client should verify connection settings and timeouts. |
| `452 4.5.3` | Too many recipients | `RCPT TO` | The message has exceeded the maximum number of allowed recipients per transaction. |

## 5xx - Permanent failures

**Permanent failures** indicate that the request **cannot succeed without modification**.

| Status code | SMTP response message | Command | Description |
|-----------|----------------------|---------|-------------|
| `501 5.1.7` | Bad sender address <address> | `MAIL FROM` | The email address provided in the `MAIL FROM` command is not a valid email address. Check the sender address format (for example, `user@domain.com`). |
| `501 5.1.7` | Bad recipient address <address> | `RCPT TO` | The email address provided in the `RCPT TO` command is not a valid email address. Check the recipient address format (for example, `user@domain.com`). |
| `501 5.5.2` | Syntax: EHLO <hostname> | `EHLO` | The `EHLO` command was sent without the required parameter. Correct syntax: `EHLO mail.example.com`. |
| `501 5.5.2` | Syntax: HELO <hostname> | `HELO` | The `HELO` command was sent without the required parameter. Correct syntax: `HELO mail.example.com`. |
| `501 5.5.2` | Syntax: STARTTLS (no parameters allowed) | `STARTTLS` | The `STARTTLS` command was sent with extra parameters. The command does not accept any arguments. Correct syntax: `STARTTLS`. |
| `501 5.5.2` | Syntax: RCPT TO: <address> <parameters> | `RCPT TO` | The `RCPT TO` command has invalid syntax. Correct syntax: `RCPT TO<user@domain.com>`. |
| `501 5.5.2` | Syntax: AUTH <type> <initial-response> | `AUTH` | The `AUTH` command has invalid syntax. Correct syntax: `AUTH PLAIN <base64-credentials>` or `AUTH LOGIN`. |
| `501 5.5.4` | Syntax: MAIL FROM: <address> <parameters> | `MAIL FROM` | The `MAIL FROM` command has invalid syntax. |
| `501 5.5.4` | Not a valid Base64 string | `AUTH` | The credentials sent during `AUTH` are not valid Base64-encoded text. Verify the client's `AUTH` encoding. |
| `501 5.5.4` | Does not contain NUL (\0) | `AUTH PLAIN` | Invalid `AUTH` format. Decoded string must follow the format: `<nul>username<nul>password`. |
| `501 5.5.4` | Does not contain the second NUL (\0) | `AUTH PLAIN` | The `AUTH PLAIN` credential string is malformed. The decoded Base64 value must follow the format: `\0username\0password`. |
| `501 5.7.0` | Authentication canceled by client | `AUTH` | The client sent `*` during the `AUTH` challenge-response exchange, which cancels authentication. Re-issue the `AUTH` command to try again. |
| `502 5.5.1` | VRFY command has been disabled | `VRFY` | The `VRFY` (verify) command is disabled on this server for policy reasons. |
| `502 5.5.1` | EXPN command has been disabled | `EXPN` | The `EXPN` (expand mailing list) command is disabled on this server for policy reasons. |
| `502 5.5.1` | Unrecognized command | Any | The command sent by the client is not recognized by the server. Check for typos or unsupported SMTP extensions. |
| `503 5.5.1` | Already authenticated | `AUTH` | The client is already authenticated in this session. There is no need to authenticate again. |
| `503 5.5.1` | Sender already specified | `MAIL FROM` | A `MAIL FROM` command has already been issued in this transaction. Use `RSET` to reset the transaction before specifying a new sender. |
| `503 5.5.1` | Need MAIL command | `DATA` / `RCPT TO` | The client sent `DATA` or `RCPT TO` before issuing `MAIL FROM`. The correct command sequence is: `MAIL FROM`, then `RCPT TO`, then `DATA`. |
| `503 5.5.1` | Need RCPT command | `DATA` | The client sent `DATA` without specifying any recipients. Issue at least one `RCPT TO` command before `DATA`. |
| `503 5.5.1` | TLS already active | `STARTTLS` | The client issued `STARTTLS`, but a TLS session is already established on this connection. TLS negotiation cannot be performed twice. |
| `504 5.5.4` | Unsupported authentication type <mechanism> | `AUTH` | The authentication mechanism requested is not supported by this server. Use one of the mechanisms advertised in the `EHLO` response (for example, `PLAIN` or `LOGIN`). |
| `504 5.5.4` | AUTH mechanism mismatch | `AUTH` | The authentication mechanism specified in the `AUTH` command does not match the handler processing it. |
| `504 5.5.4` | Unrecognized command parameter <args> | `HELP` | The `HELP` command was issued with an unrecognized parameter. Issue `HELP` without arguments to see available topics. |
| `530 5.7.0` | Must issue a STARTTLS command first | `MAIL FROM` / `RCPT TO` / `DATA` | The server requires TLS encryption before accepting mail commands. Issue `STARTTLS` and complete TLS negotiation first. |
| `530 5.7.0` | Authentication required | `MAIL FROM` / `RCPT TO` / `DATA` | The server requires authentication before accepting mail commands. Issue `AUTH` with valid credentials first. |
| `535 5.7.8` | Authentication credentials invalid | `AUTH` | The provided username/password or `API` key failed verification. The credentials are incorrect or the account does not exist. |
| `550 5.3.0` | Server error | `DATA` | An unexpected internal error occurred while processing the message. Contact support if the issue persists. |
| `550 5.7.1` | Unauthorized access (account blocked by policy) | `AUTH` | Authentication succeeded, but the account or user is blocked from sending traffic due to an administrative policy (for example, blocked account). |
| `550 5.7.1` | Empty sender not allowed | `MAIL FROM` | The `MAIL FROM` address is empty (null sender or bounce address). This server does not accept null senders. |
| `550 5.7.1` | Sender not allowed | `MAIL FROM` | The sender address provided in `MAIL FROM` is not authorized for this account. The domain or address is not registered or verified. |
| `550 5.7.1` | Header from domain does not align with envelope from domain | `DATA` | The domain in the message's `From` header does not match the domain used in the `MAIL FROM` envelope sender. This is an alignment check to prevent spoofing. |
| `552 5.3.4` | Message size exceeds fixed limit | `MAIL FROM` | The `SIZE` parameter in `MAIL FROM` exceeds the server's maximum allowed message size. Reduce the message size or split into smaller messages. |
| `552 5.3.4` | Message size exceeds fixed limit | `DATA` | The total message size (body and attachments) exceeds the maximum allowed size configured on the server. Reduce the message size or split into smaller messages. |
| `554 5.6.0` | Pre-mature end of <CRLF>.<CRLF> | `DATA` | The `DATA` stream ended before the proper SMTP end-of-data sequence (`CRLF.CRLF`) was received. The message transmission was incomplete. |
| `554 5.6.0` | Invalid or corrupt MIME multipart | `DATA` | The MIME structure of the message could not be parsed. The multipart boundaries or encoding are malformed. Verify the email client's MIME formatting. |
| `554 5.6.0` | Could not read the message. <e.g. local address ends with dot> | `DATA` | An email address in the message headers (`To`, `Cc`, `Bcc`, `From`) has invalid syntax and could not be parsed. |
| `554 5.6.0` | Attachment is empty | `DATA` | Policy rejection. One or more attachments in the message have zero bytes of content. Remove empty attachments or provide actual content. |
| `554 5.6.0` | Inline image is empty | `DATA` | Policy rejection. One or more inline images (Content-ID referenced) have zero bytes of content. Remove empty inline images or provide actual content. |
| `554 5.6.0` | Subject not present | `DATA` | Policy rejection. Missing `Subject` header. |
| `554 5.6.0` | Subject too long | `DATA` | Policy rejection. `Subject` header too long. |
| `554 5.6.0` | Body not present | `DATA` | Policy rejection. The message has no text body, no `HTML` body, and no attachments. At least one form of content is required. |