# AI agent email deliverability: a practical guide

> How to keep AI agent email out of spam: authentication, Gmail and Outlook.com sender rules, loops, retries and bounces, and what Trotta Mail does.

Source: https://trotta.email/learn/ai-agent-email-deliverability

Agent email lands when it comes from a domain with SPF, DKIM and DMARC, goes to addresses that exist and expect it, leaves at a steady and modest pace and draws few spam reports. Agents add risks of their own: guessed addresses, reply loops and retried sends. Your code should stop all three.

Updated December 3, 2026

## What decides whether an agent's email lands?

- **Authentication.** Can the receiver tell the mail came from your domain?
- **Reputation.** How your domain and sending addresses behaved before.
- **Spam reports.** How often recipients press the button.
- **Bounces.** How often you write to addresses that do not exist.
- **The message.** An honest sender and subject, and content the recipient expects.

The receiver makes the final call. You control what it has to judge.

## Which DNS records does an agent's domain need?

SPF lists who may send for the domain, DKIM signs each message, and DMARC ties both to the From address. [SPF, DKIM and DMARC](https://trotta.email/learn/spf-dkim-dmarc) has sample records. Check what is published:

```bash
dig +short TXT agents.trotta.io          # SPF: a line that starts v=spf1
dig +short TXT _dmarc.agents.trotta.io   # DMARC: starts v=DMARC1
```

The DKIM key sits at `selector._domainkey` under your domain, and your mail service names the selector. A subdomain for agents keeps their mail easy to tell apart and to switch off.

## What do Gmail and Outlook.com require from senders?

| Rule | Gmail, every sender | Gmail, over 5,000 a day | Outlook.com, 5,000 or more |
| --- | --- | --- | --- |
| Authentication | SPF or DKIM | SPF, DKIM and DMARC | SPF and DKIM both pass, with DMARC |
| From alignment | Not listed | SPF or DKIM domain matches From | SPF or DKIM domain matches From |
| Reverse DNS and TLS | Required | Required | Not on the page cited |
| Spam rate in Postmaster Tools | Below 0.3% | Below 0.3% | Not on the page cited |
| One-click unsubscribe | Not listed | Marketing and subscribed mail | Not on the page cited |

Gmail's rules cover mail to personal Gmail accounts. Microsoft's cover high volume senders to its consumer mail services, which refuse failing mail with `550 5.7.515`. Google also advises a consistent rate without bursts, and raising volume slowly.

## What goes wrong with AI agents in particular?

| Risk | What happens | Control in code |
| --- | --- | --- |
| Guessed addresses | Bounces pile up | Write to addresses you were given or that wrote to you |
| Reply loops | Two autoresponders answer each other all night | Do not auto-answer automated mail, and cap replies per thread |
| Retries | A timeout and a retry send twice | One idempotency key per task and recipient |
| Bursts | A quiet domain suddenly sends a flood | A daily cap well under the provider's |
| Fake replies | `Re:` on a new message misleads | Never add it. Gmail's guidelines say so |
| Ignored opt-outs | Spam reports | Store each one and check it before every send |

RFC 3834 says automatic responses should not answer a message whose `Auto-Submitted` header has any value other than `no`. On Trotta Mail, check `extracted.is_automated` before an agent replies.

## How should an agent send so a retry is harmless?

Derive the key from the task, not from the wording. A model rarely writes the same text twice, and the server answers `409 idempotency_key_reused` instead of sending a second version.

send_once.py, with pip install trottamail:

```python
import hashlib

from trottamail import TrottaMail, TrottaMailError

mail = TrottaMail()  # reads TROTTA_MAIL_API_KEY

def send_once(inbox_id, task_id, to, subject, text):
    key = hashlib.sha256(f"{task_id}:{to}".encode()).hexdigest()  # same task, same key
    try:
        msg = mail.messages.send(inbox_id, to=to, subject=subject, text=text, idempotency_key=key)
    except TrottaMailError as err:
        if err.code == "idempotency_key_reused":
            return "already sent for this task"  # a retry with different wording
        if err.code == "recipient_suppressed":
            return "do not write to this address"
        raise
    if msg["status"] == "pending_approval":
        return "waiting for a human"
    return msg["delivery"]["state"] if msg["delivery"] else msg["status"]
```

Run locally, a repeat returned the original message, a reworded repeat was refused, and a first contact under approval waited for a human.

## What should happen when mail bounces or is reported?

Stop writing to that address, and find out where it came from. A rising bounce rate usually means a bad source of addresses. A spam report means the recipient did not expect you. Slow down before you try anything else.

## What does Trotta Mail do about deliverability?

These rules for mail to outside addresses come from the [API reference](https://trotta.email/docs/api). Mail between Trotta Mail inboxes is not subject to the warm-up or own domain limits.

| Area | What happens |
| --- | --- |
| Your own domain | Until its sending records are published and seen, outside sends answer `409 own_domain_outside_not_open` |
| Unclaimed agents | Replies only |
| New Free organizations | 3 new outside addresses to start conversations with in the first 24 hours |
| Warm-up | Daily caps on outside recipients while the sending service warms up: `429 sending_warming_up` |
| Daily caps | 50 unclaimed, 100 Free, 1,000 Developer, 10,000 Startup, counted by recipient |
| Dead addresses and complaints | They join your suppression list, and later sends answer `409 recipient_suppressed` |
| Too many complaints | Outside sending pauses: `403 outside_sending_paused` |
| Outcomes | `delivery.state` per message, and `message.bounced` and `message.complained` events |
| Outbound screening | Mail is checked before it leaves, and held mail waits for a human |

The send call has no field for custom headers such as `List-Unsubscribe`, so it is not the tool for bulk marketing mail. Consent, content and list quality stay with you. Your own domain needs a paid plan: see [custom domain email for agents](https://trotta.email/learn/custom-domain-email-for-agents).

## Questions

### Why do my AI agent's emails go to spam?

Check authentication first, then who you are writing to. Unaligned mail, recipients who never asked and sudden bursts are common causes.

### How many emails can an agent send in a day?

As many as your provider's cap and your reputation allow. On Trotta Mail the daily caps are 100 on Free, 1,000 on Developer and 10,000 on Startup.

### Does a new domain need warming up?

Yes, in the sense that volume should grow slowly. Google warns that sudden spikes from a sender without that history can lead to rate limits or reputation drops.

### Can an agent send cold outreach?

Rules differ by country, so check the law that applies to you. Gmail asks senders to write only to recipients who want the mail.

## Sources

- [Email sender guidelines (Gmail Help)](https://support.google.com/mail/answer/81126)
- [Fix NDR error 550 5.7.515 in Outlook.com (Microsoft Support)](https://support.microsoft.com/en-us/outlook/fix-ndr-error-550-5-7-515-in-outlook-com)
- [RFC 3834, Recommendations for Automatic Responses to Electronic Mail](https://www.rfc-editor.org/rfc/rfc3834.html)

## Related

- [SPF, DKIM and DMARC explained](https://trotta.email/learn/spf-dkim-dmarc) Guides
- [How to put AI agent inboxes on your own domain](https://trotta.email/learn/custom-domain-email-for-agents) Guides
- [Connect a domain](https://trotta.email/docs/domains) Docs
- [API reference](https://trotta.email/docs/api) Docs
- [Human in the loop email for AI agents](https://trotta.email/learn/human-in-the-loop-email) Guides
- [Sales](https://trotta.email/use-cases/sales) Use cases

Give your agent an inbox of its own. Free for three agent inboxes and you. No card.

[Get an inbox](https://trotta.email/signup) [Read the docs](https://trotta.email/docs)
