> ## Documentation Index
> Fetch the complete documentation index at: https://ahasend.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> AhaSend stores all message data in the EU. See /facts.
> The API base URL is https://api.ahasend.com. Send the API key in the Authorization: Bearer header. See /api-reference/authentication.
> Use send.ahasend.com for SMTP in the EU, or send-us.ahasend.com as a US connection point forwarding to the EU. Ports 25, 587 and 2525 use STARTTLS. Port 465 is not supported. See /smtp.
> For send-only integrations, create an API Key v2 under Credentials → Add and scope it to messages:send:{your-domain}. See /send-api/credentials and /api-reference/scopes.

# SMTP Error Codes and Delivery Fixes

> Read SMTP error codes from AhaSend and recipient servers, including 550 5.1.1, authentication failures, temporary deferrals and sender-domain problems.

AhaSend SMTP errors tell you whether a connection, submission or recipient delivery failed; this reference helps you read the full reply and choose the next step.

## Where Did the Error Occur?

An error during your application's connection to AhaSend is a submission problem. A reply recorded later in a delivery attempt came from the destination mail system. Fix the component that produced the reply: changing your SMTP password will not repair a nonexistent recipient mailbox.

The three-digit SMTP reply gives a broad result. An enhanced code such as `5.1.1` adds detail. A `4xx` reply is generally temporary; a `5xx` reply is generally permanent for that attempt. Read the accompanying text and sender or recipient address. The [SMTP standard](https://www.rfc-editor.org/rfc/rfc5321.html) and [enhanced status code registry](https://www.iana.org/assignments/smtp-enhanced-status-codes/smtp-enhanced-status-codes.xhtml) define these classes.

## What Do Common Codes Mean?

These are common SMTP meanings, not a promise that every server emits identical text.

| Reply or enhanced code   | Meaning                                               | Next step                                                                |
| ------------------------ | ----------------------------------------------------- | ------------------------------------------------------------------------ |
| `220`                    | Server is ready                                       | Continue the SMTP exchange                                               |
| `235`                    | Authentication succeeded                              | Submit the message                                                       |
| `250` after message data | That server accepted the message                      | Track delivery separately; do not immediately resend                     |
| `421`                    | Service unavailable or closing the connection         | Retry later with a bounded delay after checking service status           |
| `450`, `451`, `452`      | Temporary mailbox, processing or resource problem     | Read the text and let the delivery queue retry                           |
| `530`                    | Authentication or a required security step is missing | Enable STARTTLS, then authenticate as the reply requires                 |
| `535` / `5.7.8`          | Authentication credentials are invalid                | Check the SMTP username and password, not an API key                     |
| `550 5.1.1`              | Destination mailbox address does not exist            | Correct the address; do not repeatedly retry it                          |
| `5.2.2`                  | Mailbox is full                                       | Follow the accompanying 4xx or 5xx reply and provider text               |
| `552` / `5.3.4`          | Message exceeds a size limit                          | Reduce content or attachments and check the stated limit                 |
| `5.7.1`                  | Delivery refused for a security or policy reason      | Inspect authentication, content, sender reputation and the server's text |
| `5.7.26`                 | Multiple authentication checks failed                 | Check SPF, DKIM and DMARC alignment                                      |

## Why Does AhaSend Return a 556 Domain Error?

An AhaSend submission reply such as `556 Invalid account or domain` or a reply saying the From domain is not allowed means the account, sender domain or credential's domain access needs checking. Confirm that the From address uses a verified domain allowed by that credential. For a newly added or verified domain, use the refresh timing on [domain setup](/docs/domains#troubleshooting).

Do not infer that every `556` from every recipient server has this AhaSend-specific meaning. Keep the exact reply when reporting a problem.

## Why Does Port 465 Fail?

AhaSend does not support implicit TLS on port 465. Use STARTTLS on a supported port and authenticate after TLS, as described in [SMTP settings](/docs/smtp). Do not disable certificate validation to get past a connection error. If your host blocks outbound SMTP, check its network policy or use the [HTTPS API](/docs/send-api/send-email).

## Should I Retry a Failed Send?

Let AhaSend handle recipient delivery attempts after it accepts a message. A temporary delivery event is not a request for your app to send another copy. If the connection drops before you receive the final submission reply, the outcome can be uncertain; check the message log before retrying. SMTP has no equivalent of the REST API's [idempotency key](/docs/api-reference/idempotency).

## Related Guides

* [SMTP credentials](/docs/smtp/credentials), [SMTP hosts, ports and limits](/docs/smtp), [domain setup](/docs/domains) and [email authentication](/docs/email-authentication).
* [Bounces and suppression durations](/docs/bounces), [message logs API](/docs/api-reference/messages/get-messages), [SMTP CLI](/docs/smtp/cli) and [Node.js SMTP](/docs/smtp/nodejs).
* [REST API errors](/docs/api-reference/errors), [Node.js SDK](/docs/guides/nodejs-sdk) and [troubleshooting](/docs/troubleshooting).
