[ guide ]

How to Give Your AI Agent an Email Address

Email is the last protocol your AI agent can't touch — until now. Here's how to give an agent a real, authenticated email address it can actually use, in under five minutes, with a live demo.

Create a mailboxRead the docs3 mailboxes · 100 sends/day · no credit card

The problem: AI agents can't do email

Modern AI agents can browse the web, write and run code, file pull requests, call APIs, and drive a terminal. But the moment the agent needs to sign up for something, confirm a verification code, reply to a vendor, or triage an inbox on its own — the wheels come off. The existing options are all designed for humans or for machines impersonating humans:

  • Gmail API
    requires OAuth against a human Google account, tokens rot, and Google actively detects and blocks automated sign-in. Agents break within days.
  • Self-hosted Postfix or Stalwart
    full send/receive, but you're on the hook for DKIM, DMARC, reverse DNS, IP warming, blocklists, disk quotas, and staying off spam lists. Weeks of plumbing before the first email goes out.
  • Transactional providers (SendGrid, Mailgun, Resend)
    great at outbound blasts, not designed for per-agent mailboxes, inbound threading, or the guardrails an autonomous loop needs.
  • Scraping IMAP
    brittle, slow, and violates the terms of every major provider.

None of them give you what you actually want: a real mailbox that an agent owns, with full SMTP send and receive, webhooks for inbound, and a way to programmatically provision new ones.

Meet Robotomail

Robotomail is managed email infrastructure for AI agents. API and CLI only — no web UI for email operations, because agents don't click through web UIs. Real send and receive over real SMTP, with proper authentication (SPF, DKIM, DMARC), thread-aware replies, webhooks for inbound mail, attachment handling, and built-in rate-limit guardrails.

How Robotomail connects an AI agent to the email network

Live demo: provision a mailbox in one command

One CLI call and the agent has a mailbox. No DNS, no OAuth, no waiting. The mailbox address goes live on the shared platform domain — yourname@robotomail.co — and you can immediately send and receive from it.

CLI
npx @robotomail/cli mailbox create shopping-agent

Or use the API directly:

POST /v1/mailboxes
curl -X POST https://api.robotomail.com/v1/mailboxes \
  -H "Authorization: Bearer rbt_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "address": "shopping-agent",
    "domainId": "dom_platform"
  }'

With the mailbox created, send the first email:

Send email
curl -X POST https://api.robotomail.com/v1/mailboxes/mbx_shopping/messages \
  -H "Authorization: Bearer rbt_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "to": ["vendor@example.com"],
    "subject": "Order #A-4521 — delivery update?",
    "bodyText": "Hi, checking on the status of order A-4521. Expected delivery is Thursday. Please confirm or advise."
  }'

And when the reply arrives, Robotomail delivers it to your webhook within a few seconds. The payload is a clean, structured JSON envelope — no MIME parsing on your end.

Inbound email delivered to an agent's mailbox
Inbound webhook payload
{
  "event": "message.received",
  "mailbox": "shopping-agent@robotomail.co",
  "message": {
    "id": "msg_01HX...",
    "from": "vendor@example.com",
    "subject": "Re: Order #A-4521 — delivery update?",
    "text": "Delivery confirmed for Thursday 2pm.",
    "threadId": "thr_01HX...",
    "receivedAt": "2026-04-17T10:00:00Z"
  }
}

Inside the agent loop

From the agent's perspective there are four tools: send, list, read, and reply. That's the whole surface area. Replies automatically carry the correct In-Reply-To and Referencesheaders so threads stay intact on the recipient's side — your agent doesn't have to think about any of it.

The daily send cap is the critical guardrail. A runaway loop or a prompt-injection escalation would, in a world without caps, cheerfully email a million people. Robotomail enforces the cap at the API layer — 100 sends per mailbox per day on the free tier, higher on paid plans — and returns a 429 the moment it's hit.

Custom domains: five DNS records

The platform domain is great for getting started. When you're ready to send as agent@yourcompany.com, add a custom domain. Robotomail generates exactly five DNS records — two MX for inbound routing and the send subdomain, one SPF TXT, one DKIM TXT, and one DMARC TXT. Paste them into your DNS provider and run verify.

DNS records for acme.com
MX    acme.com               mail.robotomail.com              (priority 10)
MX    send.acme.com          feedback-smtp.us-east-1.amazonses.com  (priority 10)
TXT   send.acme.com          v=spf1 include:amazonses.com ~all
TXT   resend._domainkey      p=MIGfMA0GCSq...
TXT   _dmarc                 v=DMARC1; p=quarantine; rua=mailto:dmarc@robotomail.com
CLI verification
$ npx @robotomail/cli domain verify acme.com
⏳ checking DNS...
✓ MX       propagated
✓ SPF      valid
✓ DKIM     aligned
✓ DMARC    policy ok
✓ acme.com is fully verified.

Gotchas worth knowing

  • DKIM alignment is non-obvious
    DMARC requires that the DKIM signing domain aligns with the visible From domain. Robotomail signs with a selector on your domain so alignment is automatic — but if you roll your own, this is where most setups fail silently into the spam folder.
  • Suppression lists matter
    Hard bounces and spam complaints land the address on a suppression list — every subsequent send to that address is blocked at the API layer. This protects your sender reputation, which is the single most important input to deliverability.
  • Rate limits are your friend
    Per-mailbox daily caps catch the bugs you didn't know you had. Treat the 429 as a signal, not a blocker.

What to build

Example use cases: shopping agent, recruiting agent, support triage, newsletter digester

Frequently asked questions

Can AI agents really send and receive email?

Yes. An AI agent can hold a real email address just like a human — provision a mailbox, wire an inbound webhook to your agent loop, and call a send endpoint when the agent wants to reply. Robotomail is purpose-built for this: API and CLI only, with SMTP authentication (SPF, DKIM, DMARC), thread tracking, webhooks for inbound, and per-mailbox daily send limits as a guardrail.

Why not just use the Gmail API?

The Gmail API requires OAuth with a human user account. That works for hobby projects but breaks for autonomous agents — OAuth tokens expire, Google blocks automated sign-in, and you can't programmatically provision new mailboxes. Robotomail gives each agent its own SMTP mailbox you control via API key, with no user-account dependency.

How fast can an agent receive an incoming email?

Inbound mail hits Robotomail over SMTP, is processed via JMAP polling (5 second cadence), stored in the database, and dispatched to your webhook. In the demo in this video the round trip was under five seconds end-to-end.

Do I need my own domain?

No. Every account gets a free address on the platform domain — yourname@robotomail.co. When you're ready for a branded address like agent@yourcompany.com, add a custom domain; Robotomail generates the five DNS records (MX, SPF, DKIM, DMARC) and verifies them as soon as propagation is complete.

How do I stop an agent from spamming?

Every mailbox has a hard daily send cap that Robotomail enforces at the API layer — the free tier is 100 sends per mailbox per day, with higher caps on paid plans. The cap is a cheap, effective guardrail against a runaway agent loop or a prompt-injection escalation.

What agent frameworks does this work with?

Any framework that can make HTTP requests. Robotomail exposes 4 tools (send, list, read, reply) that plug into Claude Code, Codex, OpenClaw, Hermes, LangChain, or any custom agent loop. Replies automatically carry the correct In-Reply-To and References headers so threads stay intact.

Give your agent an email address

Free tier includes 3 mailboxes, 100 sends per day, and webhook delivery. No credit card required.

Create a mailbox