← All problems and solutions

How can I tell whether an email my AI agent sent was actually delivered?

A successful send call only means the provider accepted the message. Keep the returned email ID, then read its status by webhook or by polling until it is delivered, bounced, complained or failed. Delivered means the recipient's mail server accepted it; it does not prove the message reached the inbox rather than spam, or that anyone read it.

By AISend. Updated . Also as markdown.

Why it happens

Email delivery is asynchronous. When your code calls an email API and gets back an ID, the provider has accepted the request; it has not yet talked to the recipient's mail server. The provider then connects over SMTP, may be told to retry later, and may eventually be refused. An agent that reads "success" from the send tool and reports "email delivered" is wrong in all of those cases.

SMTP itself draws the line. RFC 5321 says that when a receiving server replies 250 OK after the message data, it takes responsibility for delivering or relaying the message and must report a later failure by sending a message back. So a bounce can arrive after the send returned, sometimes minutes later, and a missing bounce is not proof of delivery on its own.

You can recognise the problem when users say "I never got it" while your logs show a successful send, when the agent summarises sends as delivered without checking, or when a list has a few addresses that bounced weeks ago and keep being retried.

How to know what happened to each email (any provider)

  1. Store the email ID next to your business key. Every later check starts from the ID the provider returned. Save it in the same record as the order or ticket it belongs to, so that a bounce event can be traced back to a person and a reason.
  2. Learn the difference between the stages. Accepted by the API, handed to the sending infrastructure, accepted by the recipient's server, and placed in a mailbox are four different facts. Amazon SES documents its Delivery event as the time SES delivered the email to the recipient's mail server, with the SMTP response of the remote server that accepted it. That is the strongest signal a sender gets, and it still says nothing about the inbox folder.
  3. Subscribe to delivery events with a webhook. Register an HTTPS endpoint for delivered, bounced, complained and failed events. Verify the signature on every request, answer quickly with a 2xx, and process events idempotently, because providers retry and events can arrive out of order. Update your record by email ID.
  4. Poll as a fallback with a backoff schedule. If you cannot expose a webhook (a local agent, for example), poll the status endpoint by ID on a schedule such as 5 seconds, 30 seconds, 2 minutes, then every 10 minutes for a few hours, and stop at a terminal status. Do not poll in a tight loop: it will hit rate limits.
    const TERMINAL = new Set(["delivered", "bounced", "complained", "failed"]);
    
    async function waitForOutcome(id: string, getStatus: (id: string) => Promise<string>) {
      const waits = [5, 30, 120, 600, 600, 600]; // seconds
      for (const s of waits) {
        await new Promise((r) => setTimeout(r, s * 1000));
        const status = await getStatus(id);
        if (TERMINAL.has(status)) return status;
      }
      return "unresolved"; // report it as unresolved, never as delivered
    }
  5. Map every status to an action. delivered: record it and stop. bounced with a permanent reason: stop mailing that address. Amazon SES says Permanent bounces should be removed from your list and Transient ones may succeed later. complained: stop mailing that person and look at why. failed or still unresolved after hours: investigate before any resend, and never resend without the original idempotency key.
  6. Expect soft failures and delays. A mailbox that is full or a recipient server that is temporarily unavailable produces a delay, not a bounce, until the sender gives up. SES publishes a separate DeliveryDelay event type for this, so a status that stays "sent" for a while is normal and a reason to wait, not to resend.
  7. Do not equate delivered with inbox or read. Inbox placement depends on authentication (SPF, DKIM, DMARC), the sending domain's history and the content. Opens come from a tracking pixel, and SES's own open events carry an isBotEvent field because automated systems can trigger them. Test placement by sending to seed addresses you own at the major providers.
  8. Make the agent report only what the status says. Tell the agent to quote the status exactly as returned and to say "accepted, not yet delivered" until the status is delivered. Add a rule that a bounced or complained status is escalated to a human, not retried.

What each signal proves and what it does not

The email-pipeline stages below hold for any provider; the SES wording is from Amazon's event documentation read on 2026-11-13.

SignalWhat it provesWhat it does not prove
API returns 200/202 and an IDThe provider accepted your requestThat any mail server has seen the message
Provider status "sent"The message left the provider's sending systemThat the recipient's server accepted it
Delivery event / status "delivered"The recipient's mail server accepted the message (SES: with its SMTP response)That it went to the inbox and not spam, or that it was read
Bounce event / status "bounced"The address or server refused it (Permanent: remove the address; Transient: may work later)That your content was the cause: it is often a bad address
Complaint event / status "complained"The recipient reported it as spam through their providerWhich person did it: most providers redact the address
Open or clickA request hit the tracking pixel or linkThat a human read it: bots and image prefetch can trigger opens

Treat the delivered status as the best evidence available to a sender, and report it as exactly that.

When to use AISend

AISend gives each send an email ID and a status you can read two ways: the get_email_status tool returns one email's delivery status with recipients, subject and body, and list_emails returns a compact list (id, from, to, subject, status, createdAt, opened, clicked) that you can filter, for example with status "bounced". The status is one of queued, sending, sent, delivered, failed, bounced, complained or quarantined. quarantined means the content gate held the message for review and nothing has been sent; a retry with the same idempotency key returns that same record. Report the status as returned and do not claim delivery before it says delivered.

For event-driven flows AISend webhooks deliver sent, delivered, bounced, complained and failed events (or "*" for all), signed with HMAC-SHA256, to an endpoint you control. AISend sends through AWS SES, so the SES semantics above apply underneath. Bounced and complained addresses are suppressed, and a later send to a suppressed address is refused with HTTP 422. AISend does not publish inbox-placement figures and offers no SLA.

  • If you need to know that a human read or acted on the message, use your own tracked link or a reply address; email-level opens are not reliable evidence.
  • If you need inbox-placement testing, use a seed-list tool or send to your own mailboxes; no sending API can promise placement.
  • If you need synchronous confirmation inside the same request, email is the wrong channel; use an in-app notification or an SMS provider with receipts.

Copy-paste prompt for an AI assistant connected to AISend

Connect an assistant first (setup for ChatGPT, Claude, Cursor and Gemini CLI), then paste:

Assign to AISend: call list_emails with limit 20 and show me each email's id, to, subject and status. For any email whose status is not delivered, call get_email_status and tell me exactly what it returned. Report statuses exactly as returned and do not say delivered unless the status is delivered. Do not resend anything; show me what you did so I can approve any follow-up.

Frequently asked questions

Does "delivered" mean the person saw my email?

No. It means the recipient's mail server accepted it. The message can still be filtered to spam or never opened.

Why is my email stuck on "sent"?

The receiving server may be delaying or rejecting it temporarily, and the provider keeps retrying for a while. Wait through the retry window before treating it as lost, and do not resend with a new key.

What should an agent do when an email bounces?

Stop mailing that address, tell a human, and check the address for typos. Do not retry unchanged. Providers typically suppress hard-bounced addresses, and mailing them again hurts your reputation.

Are open and click statuses reliable?

They are hints. Opens depend on a tracking pixel and can be triggered by bots or blocked by clients, and Amazon SES flags possible bot events itself. Use them for trends, not for proof.

Where can I see every email my agent sent in AISend?

The Emails page of the AISend dashboard shows every sent email with its status, and the list_emails tool returns the same list to an assistant.

Sources

Related