All solutions
Solutions

Aiemail — Email Built for AI Agents, Not Human Inboxes

Email built for AI agents: each one gets its own address, sends in one call, and receives replies as structured events.

Aiemail is email infrastructure purpose-built for AI agents, not human inboxes. Each agent gets its own address, sends with one API call, and receives replies as structured JSON events — no MIME parsing, no IMAP loop. Mails.ai tracks reputation per agent so a noisy one is paused on its own, and scans every inbound message for prompt injection before it reaches your agent’s context window.

Why traditional email breaks when AI agents use it

Traditional email was built for one-to-one human communication. Marketing platforms added volume sending. Neither model fits an AI agent that needs to send a notification, read the reply, decide what to say next, and do this across hundreds of parallel conversations — each from a distinct, authenticated identity.

Aiemail flips the model: the email address is the agent’s identity, not the company’s. When an agent at support@yourapp.com sends a follow-up, it’s not a blast from a shared noreply address — it’s a message from that agent’s own address, with a reputation score that lives or dies by that agent’s behavior. The reply comes back as structured JSON, not raw MIME, so the agent can act on it without parsing.

Three things every aiemail setup needs

Regardless of which framework your agents run on, aiemail infrastructure needs to cover three things:

  • Per-agent addresses and reputation tracking — one agent’s high send volume or bounce rate should be caught and paused on its own. This requires a reputation score per agent, not one per account.
  • Structured inbound parsing — agents can’t reliably parse raw MIME. Replies need to arrive as events with extracted fields: sender, subject, body text, threading references, and attachment metadata.
  • Prompt-injection scanning — inbound email from untrusted senders is an attack surface. Any message that reaches an agent’s context window should be scanned for injection attempts before the agent acts on it.
# Every workspace starts with an aiemail address: the agent hello
curl https://api.mails.ai/v1/agents/hello \
  -H "Authorization: Bearer $MAILS_API_KEY"
# → { "id": "agt_…", "name": "hello", "email": "hello@yourapp.mails.ai",
#     "receiving_address": "hello.yourapp@in.mails.ai", … }

# Send an email from that agent
curl https://api.mails.ai/v1/messages \
  -H "Authorization: Bearer $MAILS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "agent": "hello",
    "to": "customer@example.com",
    "subject": "Your ticket is resolved",
    "body_text": "We closed ticket #4821. Reply here if anything else comes up."
  }'

# Inbound replies arrive as webhook events — structured, injection-scanned
# {
#   "type": "reply.received",
#   "agent_id": "agt_…",
#   "thread_id": "thrd_abc123",
#   "injection_score": 0.02,
#   "quarantined": false,
#   "data": {
#     "from": { "address": "customer@example.com", "name": null },
#     "subject": "Re: Your ticket is resolved",
#     "extracted_text": "Thanks — one more thing actually..."
#   }
# }

MCP-native aiemail for Claude and Cursor agents

Agents running inside MCP clients — Claude Desktop, Cursor, or any other MCP-enabled environment — can use the Mails.ai MCP server to send and receive email without writing any integration code. The server exposes tools such as mails_send, mails_list_threads, and mails_get_thread that the agent can call directly from its tool use loop.

// claude_desktop_config.json — add the Mails.ai MCP server
{
  "mcpServers": {
    "mails": {
      "command": "npx",
      "args": ["-y", "@mailsai/mcp-server"],
      "env": { "MAILS_API_KEY": "your_key_here" }
    }
  }
}

Once the server is configured, any Claude or Cursor agent in that session can send and read email through tool calls. Each send goes from the agent’s provisioned address with full DKIM and SPF authentication, and counts toward that agent’s own reputation score. For routing, classifying, and monitoring email across agents, see AI email management.

Get started with aiemail in under five minutes

Create a free account, provision your first agent, and send a test email — all before adding a credit card. The Free tier covers 3,000 emails and 3,000 inbound replies a month, so you can validate the full send-receive loop before committing to a paid plan. If you need a deeper look at what an AI email agent requires, or how to wire up email for AI agents in your stack, those guides walk through each step.

Frequently asked questions

What does aiemail actually mean?
Aiemail refers to email infrastructure designed for AI agents — not email marketing, not a human inbox, but a programmable address an agent uses to send notifications, read replies, and continue a conversation thread. The distinction matters: an agent needs per-address reputation tracking, structured inbound parsing, and prompt-injection scanning on replies. A standard SMTP relay provides none of these.
How is aiemail different from a regular email API?
A standard transactional email API is designed for one-directional sends at volume from a shared pool. Aiemail is bidirectional: each agent owns a separate address, inbound replies come back as structured JSON events rather than raw MIME, and the reputation of each agent’s sending identity is tracked independently so a noisy agent is paused on its own (every agent pauses only if the workspace’s mail as a whole crosses the bounce or complaint line). Mails.ai also runs prompt-injection scanning on every inbound message within your plan’s limits before it reaches your agent.
Which AI agents and frameworks work with Mails.ai aiemail?
Any agent that can make an HTTP request works with the REST API. There are first-party SDKs for TypeScript (@mailsai/sdk on npm) and Python (mailsai on PyPI). For MCP-native agents (Claude Desktop, Cursor, or anything running an MCP client), the Mails.ai MCP server exposes send, receive, and list tools that agents can call directly without writing any integration code.
What does aiemail infrastructure cost on Mails.ai?
The Free tier allows 3,000 emails and 3,000 inbound replies a month for evaluation. Pro is $20/month for 50,000 emails and 50,000 inbound replies, and Scale is $99/month for 250,000 emails and 500,000 inbound replies; yearly billing is two months free. The prompt-injection scan runs on every inbound on every plan, and intent classification of first-contact mail is opt-in on paid plans at no extra charge. There is no per-seat charge and no setup fee.

Explore the product

Give your first agent an inbox

Free covers 3,000 emails and 3,000 inbound replies a month, with no card. Upgrade when your agents get busy.

Get your API key