# Mails.ai > The AI email API for agents and developers. Email infrastructure built specifically for AI — drop ~6 lines into any agent and it gets a working email address with parsing, identity, and reputation built in. Typed reply events, per-agent reputation graph, native prompt-injection scanning, MCP-native distribution. Self-serve signup, no contact-sales gate, and sending works immediately — no approval queue. Each agent can be held to the domains you allow and to its own hourly and daily send caps, which its own key cannot loosen. ## API Base URL https://api.mails.ai — all endpoints under /v1 — auth header: Authorization: Bearer mk_live_. Send: POST /v1/messages with JSON { agent, to, subject, body_text }. Returns the sent message (id, status, cost_usd). Receive: GET /v1/events?event_type=message.received, live tail GET /v1/events/stream (SSE), or register a webhook with POST /v1/webhooks. - [API quickstart](https://mails.ai/docs/quickstart): Key, agent, first send, first reply event — five minutes. - [API reference](https://mails.ai/docs/api-reference): Every REST endpoint with exact request and response fields. - [Docs as Markdown](https://mails.ai/docs/llms.txt): Every docs page as a plain Markdown link, in the docs' own order. Open source (MIT): the MCP server, the TypeScript SDK and the Python SDK are public at https://github.com/mailsai/mailsai, with six runnable examples (first send, inbox loop, the injection firewall, OpenAI Agents SDK, LangGraph, MCP client config). The API implementation itself is closed. - [Source code and examples](https://github.com/mailsai/mailsai): MIT-licensed MCP server, TypeScript and Python SDKs, and six runnable examples you can execute on a test key. ## Background - [Architecture](https://mails.ai/architecture): How sends and replies flow — send pipeline, typed reply events, per-agent reputation graph, multi-vendor failover. - [Use cases](https://mails.ai/use-cases): Four named agents on one primitive — support, notifications, doc-parse, browser 2FA. - [Pricing](https://mails.ai/pricing): Self-serve only. Free 3K emails + 3K inbound / Pro $20 (50K emails + 50K inbound) / Scale $99 (250K + 500K), monthly or yearly (two months free). Dedicated IP available on request. No Enterprise gate. - [About](https://mails.ai/about): What we are, what we ship, how we operate, what we don't do. - [Trust](https://mails.ai/trust): Security posture, sub-processors, compliance status. - [Sub-processors](https://mails.ai/sub-processors): Vendors that process customer data on our behalf. ## Comparisons - [vs AgentMail](https://mails.ai/vs/agentmail): AgentMail and Mails.ai both ship programmatic agent inboxes — the same primitive, different design choices. AgentMail is funded, in-market, and has 500+ B2B customers. Mails.ai goes deeper on typed reply events, prompt-injection scanning and per-agent reputation, and Scale includes unlimited agents. - [vs Resend](https://mails.ai/vs/resend): Resend is the dev-loved modern email API: send-first DNA, polished DX, React Email open source, and now Inboxes, a private beta aimed at agents. Mails.ai is built for agents that read inbound — typed reply events, prompt-injection scanning, per-agent reputation. Different shape, different center of gravity. - [vs SendGrid](https://mails.ai/vs/sendgrid): SendGrid built the playbook for transactional email-as-a-service in 2009 and was acquired by Twilio in 2019. The platform is reliable, deeply integrated, and enterprise-trusted. Mails.ai is built for the 2026 agent era — different primitives, different design center. - [vs Postmark](https://mails.ai/vs/postmark): Postmark earned its premium-transactional reputation through deliverability obsession and human support. They are excellent at what they do. Mails.ai is built around the agent inbound primitive Postmark deliberately does not chase — typed reply events, injection scanning, MCP-native, and a separate allowance for received mail. - [vs Amazon SES](https://mails.ai/vs/amazon-ses): SES is raw send/receive infrastructure at $0.10 per 1,000 emails — extreme cost efficiency, no agent abstractions. Mails.ai is the agent layer, already built. Pick SES if you have engineering bandwidth to build the agent layer yourself; pick mails.ai if you want it shipped. - [vs Mailgun](https://mails.ai/vs/mailgun): Mailgun shipped the playbook for developer-first email APIs in 2010 and has 14+ years of production iteration behind them. Mails.ai is the agent-era equivalent — typed reply events, injection scanning, MCP-native. Different design centers, different decades, both coherent. - [vs Cloudflare Email](https://mails.ai/vs/cloudflare-email): Cloudflare Email Routing is inbound-only forwarding bundled with Workers. Public Workers-Email send is in beta (April 2026). For free, edge-distributed, Workers-tied inbound routing, they win. For real send + reply primitives + agent abstractions, mails.ai is the right shape. - [vs Loops](https://mails.ai/vs/loops): Mails.ai is a different shape from Loops — agent inbound primitives (typed reply events, injection scanning, per-agent reputation) that a SaaS lifecycle tool doesn't ship. Coherent for different problem spaces. - [vs Mailosaur](https://mails.ai/vs/mailosaur): Mailosaur is the established email-testing tool, with SMS, email previews and libraries in nine languages. Mails.ai starts free, gives each test its own plus address, and Pro takes 50,000 inbound emails a month for $20, where Mailosaur's entry plan takes 15,000. - [vs MailSlurp](https://mails.ai/vs/mailslurp): MailSlurp does far more: SMS, device previews, inbox placement tests and SDKs in eleven languages. Mails.ai does one job, catching your app's emails in tests, and its $20 plan takes 50,000 inbound emails a month, where MailSlurp's $19.99 plan takes 1,000. ## Integrations - [Claude](https://mails.ai/integrations/claude): Add the hosted MCP server under Customize → Connectors, sign in with OAuth, and switch it on in a chat. Works on Free, Pro, Max, Team and Enterprise; Free plans get one custom connector. - [Codex](https://mails.ai/integrations/codex): Add https://api.mails.ai/mcp with codex mcp add, sign in with codex mcp login, and the CLI, IDE extension and desktop app all see the mails tools. config.toml and API-key setups included. - [GitHub Copilot](https://mails.ai/integrations/github-copilot): VS Code's MCP: Add Server saves the hosted server to .mcp.json and signs you in. Copilot's cloud agent takes it with an API key kept as a COPILOT_MCP_ secret, and Copilot CLI adds it with one command. - [Gemini](https://mails.ai/integrations/gemini): gemini mcp add --transport http adds the hosted server and /mcp auth mails signs you in. Also: settings.json with an API key, Code Assist in VS Code, and the Gemini app's custom apps. - [v0](https://mails.ai/integrations/v0): Open + → MCPs in v0's prompt form and add https://api.mails.ai/mcp with OAuth or a bearer token. The app v0 generates sends through @mailsai/sdk with MAILS_API_KEY as an environment variable. - [Bolt](https://mails.ai/integrations/bolt): Add a custom MCP server under Connectors with MCP OAuth and switch it on per project. Store MAILS_API_KEY with Create secret so the app's server functions can call the API. - [Lovable](https://mails.ai/integrations/lovable): Add https://api.mails.ai/mcp as an MCP server in Connectors with OAuth. The connector is yours while you build; the published app sends through the API with MAILS_API_KEY in Secrets. - [Replit](https://mails.ai/integrations/replit): Add https://api.mails.ai/mcp under Integrations → MCP Servers for Replit Agent, or use the one-click install link. Your app reads MAILS_API_KEY from Secrets. - [Claude Code](https://mails.ai/integrations/claude-code): One JSON snippet in ~/.claude.json and your Claude Code session has email. mails_send / mails_reply / mails_list_threads / mails_list_replies / mails_get_reputation and more tools auto-discovered, no SDK install, no glue code. - [Cursor](https://mails.ai/integrations/cursor): Same JSON snippet as Claude Code, dropped into ~/.cursor/mcp.json. Cursor auto-discovers the mails_* tools, asks before running them depending on your Run Mode, and the in-IDE agent can send + read email without leaving the editor. - [Cline](https://mails.ai/integrations/cline): Same MCP server config as Claude Code and Cursor — pasted into Cline's MCP Settings panel. Mails.* tools auto-register, Cline asks before running one unless you turn on MCP auto-approve, and the autonomous-loop agent can send + read email as part of multi-step task runs. - [Continue](https://mails.ai/integrations/continue): Continue runs in both VS Code and JetBrains IDEs. Drop the mails.ai MCP server config into ~/.continue/config.yaml and the same mails_* tools become available in Continue's Agent mode — same shape, two editor ecosystems covered. - [Windsurf](https://mails.ai/integrations/windsurf): Windsurf's Cascade is one of the most capable autonomous IDE agents. Drop the mails.ai MCP server into Windsurf's MCP config and Cascade auto-discovers the mails_* tools — usable in Code mode or Plan mode (Plan writes a plan and asks before implementing). - [OpenAI Agents SDK](https://mails.ai/integrations/openai-agents-sdk): OpenAI's Agents SDK speaks MCP via MCPServerStdio. One config block wires mails.ai in. Or wrap the REST API as tool() function tools for fine-grained control. Both shapes documented here with full code. - [Anthropic SDK](https://mails.ai/integrations/anthropic-sdk): Claude's API can call the hosted mails.ai MCP server for you (MCP connector, beta), as a tool surface for any Claude conversation. Or use the @mailsai/sdk client directly for fine-grained control. Both paths documented here. - [Vercel AI SDK](https://mails.ai/integrations/vercel-ai-sdk): Connect the hosted server with createMCPClient (@ai-sdk/mcp), or wrap the @mailsai/sdk client in the SDK's tool() helper. Works seamlessly in Next.js Route Handlers, Server Actions and the Node 18+ runtime; edge runtime untested. - [LangGraph](https://mails.ai/integrations/langgraph): LangGraph doesn't have native MCP-client primitives (LangChain's langchain.mcp.MCPAdapter, beta, loads MCP tools into LangGraph), so the mails.ai integration is via @tool decorated functions wrapping the REST API. Pattern works in StateGraph nodes, conditional edges, and parallel-fanout flows. Full Python example with state persistence. - [Pydantic AI](https://mails.ai/integrations/pydantic-ai): Pydantic AI brings the same type-safety obsession to agent code that Pydantic brought to data validation. mails.ai integrates as @agent.tool decorated functions with typed input schemas, dependency injection for the mails client, and structured output for downstream graph nodes. ## Documentation - [Quickstart](https://mails.ai/docs/quickstart): Key → first send (your agent is created automatically) → first reply event. The five-minute path through the REST API, with copy-paste curl and fetch. - [Authentication](https://mails.ai/docs/authentication): Bearer keys, the mk_live_ format, four scopes (send / read / manage / draft), live vs test mode, and rotation. Everything about authenticating a request. - [Core concepts](https://mails.ai/docs/concepts): Workspace, agent, message, event, thread, draft, webhook, suppression, reputation — the eight nouns the API is built from, and how they fit together. - [API reference](https://mails.ai/docs/api-reference): Every endpoint, with the exact request and response fields — messages, batch, received, events, webhooks, agents, keys, suppression. - [Errors](https://mails.ai/docs/errors): One envelope on every failure — type, code, message, param, request_id. The type → status mapping and the full code list. - [Events & streaming](https://mails.ai/docs/events): List events or tail the live SSE stream. Every event type, the inbound payload, and a reconnect-safe consumer. - [Webhooks](https://mails.ai/docs/webhooks): Register an endpoint, verify the HMAC signature, handle retries. The push half of the events model, done safely. - [Limits](https://mails.ai/docs/limits): Per-tier send caps, single-message payload limits, and the 429s you get past them, which say when to retry. - [SDKs & MCP](https://mails.ai/docs/sdks): The TypeScript SDK and the MCP server are on npm, the Python SDK is on PyPI. All thin wrappers over the same REST surface. - [Python](https://mails.ai/docs/send-with-python): Install mailsai, set MAILS_API_KEY, send one message, and read the reply your agent gets back. - [cURL](https://mails.ai/docs/send-with-curl): No SDK, no install: one POST sends the message and one GET shows the reply. - [Next.js](https://mails.ai/docs/send-with-nextjs): One route handler sends, one receives signed reply events. App Router, server-side only. - [Express](https://mails.ai/docs/send-with-express): One Express server: a route that sends, and a webhook route that receives signed reply events. - [FastAPI](https://mails.ai/docs/send-with-fastapi): One FastAPI app: a route that sends, and a webhook route that receives signed reply events. - [CLI](https://mails.ai/docs/cli): Send and receive email, follow events and set up AI clients from your terminal. Tables for people, JSON for scripts and agents. - [MCP server](https://mails.ai/docs/mcp): Give an AI client email tools: the hosted server, or the local one through npx. - [Agent skills](https://mails.ai/docs/agent-skills): Instructions an AI agent loads when it works with mails.ai: sending and receiving, acting on inbound mail safely, and staying within the rules. - [Integrations](https://mails.ai/docs/integrations): Connect mails.ai to the frameworks and clients you already use. - [Inbound](https://mails.ai/docs/inbound): Every agent has an address that receives mail. Replies to its own sends are told apart from new mail. - [Codes and links](https://mails.ai/docs/codes-and-links): Every received message lists the codes and links in it, and one call waits for the email to arrive. - [Email testing](https://mails.ai/docs/email-testing): Each test gets its own plus address, waits for the email sent to it, and reads the code or link. - [Browser agents](https://mails.ai/docs/browser-agents): A browser agent types its own address into a form, then reads the code the site emails it. - [Attachments](https://mails.ai/docs/attachments): Attach up to 10 files to an email you send, and download the files on mail your agents receive. - [Search](https://mails.ai/docs/search): Find received and sent mail by words, sender, recipient, date, folder or label. - [Folders and labels](https://mails.ai/docs/folders-and-labels): Every thread sits in one folder and can carry labels. Both work as filters on lists and search. - [Introduction](https://mails.ai/docs/knowledge-base): Answers to what comes up once agents send and receive real mail. - [Claude Agent SDK](https://mails.ai/docs/claude-agent-sdk): Connect a Claude agent to the hosted MCP server, in TypeScript or Python. - [OpenAI Agents SDK](https://mails.ai/docs/openai-agents-sdk): Connect an OpenAI agent to the hosted MCP server, in Python or TypeScript. - [Vercel AI SDK](https://mails.ai/docs/vercel-ai-sdk): Turn the mails.ai MCP tools into AI SDK tools, in TypeScript. - [LangGraph](https://mails.ai/docs/langgraph): Load the mails.ai MCP tools into a LangGraph agent, in Python. - [CrewAI](https://mails.ai/docs/crewai): Give a crew's agent the mails.ai MCP tools, in Python. ## Blog - [The firewall between your AI agent and your sending reputation.](https://mails.ai/blog/agent-email-firewall): The scary part of letting an AI agent send email isn't a typo — it's that a bad loop, a poisoned input, or one abusive tenant can get your whole domain flagged as a spammer. Mails.ai is built as a firewall for exactly that: a reputation classifier and suppression check run before any send leaves, a complaint cron auto-suspends senders at 0.3% (the spam-rate line in Gmail's sender guidelines), reputation is tracked per agent and per workspace, and inbound is injection-scanned. Cold outreach is explicitly not a supported use case. - [Structured reply events — why your agent should never read raw email](https://mails.ai/blog/typed-reply-events): Most email APIs hand your agent a string body. Mails.ai parses every inbound into a structured reply event — injection score and sender reputation on every event, opt-in classification of first-contact mail for intent, entities, and urgency — so your code reads against a structured object, not raw bytes. - [Prompt injection in inbound email is a real RCE class. Here's how mails.ai scans for it.](https://mails.ai/blog/prompt-injection-in-inbound-email): Prompt injection in agent runtimes is a tracked vulnerability class — Microsoft Security Response Center publishes AI-security advisories, OWASP catalogues it as LLM01. The vulnerability is structural: any agent that reads raw inbound text is exposed. Mails.ai runs a six-category scanner on every inbound before the structured reply event reaches your code, and flags high-confidence attacks (`quarantined`) so your agent skips them. - [Per-event metered pricing: why monthly tiers force over-commit](https://mails.ai/blog/per-call-mpp-pricing): Resend wants $20/month for anything from 3,001 to 50,000 emails. Postmark's smallest paid plan is $15. Agent traffic is bursty by nature — quiet days and incident spikes — so monthly tiers structurally force over-commit. This post walks through the per-event math, and why we did not launch a metered plan ourselves. - [MCP-native email — `from mails import agent` becomes the default agent comms primitive](https://mails.ai/blog/mcp-native-email): MCP collapsed N runtimes × M SDKs into one server that every runtime can use. Mails.ai shipped MCP-native from day one — drop a JSON snippet into your runtime config and your agent gets send, reply, list_threads, and get_reputation tools automatically. - [Handling Bounces and Complaints for Agent Email](https://mails.ai/blog/handling-bounces-and-complaints-agent-email): Learn how to handle email bounces and complaints in AI agent systems — suppression lists, feedback loops, threshold logic, and deliverability protection. - [Model Context Protocol for Email Tools: Dev Guide](https://mails.ai/blog/model-context-protocol-email-tools): Learn how Model Context Protocol exposes email as LLM tools — architecture, tool definitions, and real implementation patterns for AI agents. - [Transactional Email APIs With Inbound Parsing: Dev Guide](https://mails.ai/blog/transactional-email-api-inbound-parsing-developer-guide): A complete developer guide to transactional email APIs with inbound parsing: webhooks, MIME parsing, threading, routing, and building bidirectional email flows. - [Detecting Auto-Replies to Prevent Agent Email Loops](https://mails.ai/blog/detecting-auto-replies-prevent-agent-email-loops): Learn how to detect auto-replies, vacation messages, and OOO emails to prevent infinite loops in AI agent email workflows. Covers headers, heuristics, and code. - [AI for Email: Integrating Agents Into Transactional Flows](https://mails.ai/blog/ai-for-email-integrating-agents-transactional-workflows): Learn how developers wire AI agents into transactional email workflows—parsing, classification, dynamic content, and reply handling with real code. - [Agent Email Address: Why Every AI Agent Needs One](https://mails.ai/blog/agent-email-address-dedicated-routable-inbox): Why every AI agent needs a dedicated, routable email address — covering DNS identity, threading, deliverability, and inbox architecture. - [Best Email API for AI Agents 2026 | Full Comparison](https://mails.ai/blog/best-email-api-for-ai-agents-2026): Compare the best email APIs for AI agents in 2026. Pricing, inbound parsing, MCP support, and deliverability—with a clear recommendation. - [Thread Email Replies Programmatically: Complete Guide](https://mails.ai/blog/thread-email-replies-programmatically): Learn how to thread email replies programmatically using Message-ID, In-Reply-To, and References headers. Concrete code examples for Python and TypeScript. - [Composing RFC-Compliant Replies from an AI Agent](https://mails.ai/blog/composing-rfc-compliant-replies-ai-agent): Learn how AI agents compose RFC-compliant email replies: Message-ID threading, In-Reply-To, References headers, MIME structure, and reply quoting done right. - [SendGrid vs Mails.ai for Automated Email: 2026 Guide](https://mails.ai/blog/sendgrid-vs-mailsai-automated-email): SendGrid vs Mails.ai for automated email: compare pricing, inbound parsing, MCP support, and deliverability for AI agents and automated senders. - [AI Email Automation for Developers: Core Concepts](https://mails.ai/blog/ai-email-automation-for-developers-core-concepts): Learn what AI email automation actually is, how it works under the hood, and how to decide when to build it — a technical guide for developers. - [Thread-Aware Email Replies for AI Agents | One Thread](https://mails.ai/blog/thread-aware-email-replies-ai-agents): Learn how AI agents maintain email thread continuity using Message-ID, In-Reply-To, and References headers — with code examples and deliverability tips. - [How AI Agents Use Email: Autonomous Send, Receive, Act](https://mails.ai/blog/how-ai-agents-use-email-autonomously): Learn how AI agents send, receive, and act on email autonomously — covering SMTP, inbound parsing, threading, webhooks, and decision loops with code examples. - [Email for AI Agents: Give Every Agent Its Own Address](https://mails.ai/blog/email-for-ai-agents-per-agent-address-and-inbox): Learn how to give every AI agent its own email address and inbox — covering addressing schemes, routing, DNS setup, and inbox isolation for multi-agent systems. - [Email for AI Agents: Real Address, Inbox & Send Capability](https://mails.ai/blog/email-for-ai-agents-real-address-inbox-send): Learn how to give your AI agent a real email address, working inbox, and send capability — with SPF, DKIM, webhooks, and threading explained for developers. - [Retry Logic and Idempotency for Email in AI Agents](https://mails.ai/blog/retry-logic-idempotency-resend-failed-email-ai-agents): Learn how to resend failed emails programmatically with safe retry logic, idempotency keys, exponential backoff, and deduplication for AI agent pipelines. - [Mails.ai vs Postmark for AI Agent Email: Full Comparison](https://mails.ai/blog/mails-ai-vs-postmark-ai-agent-email): Mails.ai vs Postmark for AI agent email: compare inbound parsing, webhooks, MCP support, and transactional API pricing to choose the right infrastructure. - [AI Email Address: .ai Domain & Dedicated Inbox Explained](https://mails.ai/blog/what-is-an-ai-email-address): What is an AI email address? Learn how .ai domains, dedicated inboxes, and agent-specific email infrastructure differ from standard addresses. - [AI for Email Automation: Triggers, Parsing & Actions](https://mails.ai/blog/ai-email-automation-triggers-inbound-parsing-agent-actions): A developer guide to AI email automation: event triggers, inbound parsing pipelines, classification, and agent actions with real code examples. - [AI Email Platform Architecture Guide for Developers](https://mails.ai/blog/ai-email-platform-architecture-guide): Learn how AI email platforms differ from transactional APIs: inbound parsing, MCP, classification, and agent-native architecture explained. - [AgentMail API vs Mails.ai: Best Email API for AI Agents](https://mails.ai/blog/agentmail-api-vs-mailsai): AgentMail API vs Mails.ai: a deep technical comparison of pricing, inbound parsing, MCP support, deliverability, and architecture for AI agent developers. - [Inbound Email Webhooks for AI Agents: Parse & Act](https://mails.ai/blog/inbound-email-webhooks-ai-agents-classification-parsing-actions): Learn how to wire inbound email webhooks for AI agents: MIME parsing, classification pipelines, idempotency, and automated action patterns with real code. - [AI in Email: Agents as Senders, Receivers & Reasoners](https://mails.ai/blog/ai-in-email-agents-action-layer): AI in email goes beyond notifications. Learn how agents send, receive, parse, and act on email as a full action layer with real engineering patterns. - [Mails.ai vs SendGrid for AI Agent Email: API Comparison](https://mails.ai/blog/mails-ai-vs-sendgrid-ai-agent-email): Mails.ai vs SendGrid for AI agent email: compare transactional APIs, inbound parsing, MCP support, pricing, and deliverability for automated senders. - [Securing an Agent Email Inbox Against Spoofing](https://mails.ai/blog/securing-agent-email-inbox-against-spoofing): Learn how to secure an agent email inbox against spoofing using SPF, DKIM, DMARC, webhook validation, and sender verification for AI agents. - [Transactional Email APIs With Inbound Parsing (2026)](https://mails.ai/blog/best-inbound-email-parsing-api-for-developers): Side-by-side breakdown of Mailgun, SendGrid, Postmark, and Mails.ai on inbound routing, webhooks, and pricing. Pick the right API for your stack. - [AI Email Agent: Give Your Agent Its Own Address & Inbox](https://mails.ai/blog/ai-email-agent-address-inbox-send-capability): Learn how to give an AI email agent its own address, inbox, and send capability. Covers DNS setup, inbound parsing, SMTP auth, and threading. - [SPF DKIM DMARC for Automated Email Senders](https://mails.ai/blog/spf-dkim-dmarc-automated-email-senders): A technical guide to SPF, DKIM, and DMARC for automated and AI agent email senders. Configure authentication correctly and protect deliverability. - [Mailgun vs Mails.ai for Agent Email: Full Comparison](https://mails.ai/blog/mailgun-vs-mails-ai-agent-email): Mailgun vs Mails.ai for agent email: compare architecture, pricing, inbound parsing, MCP support, and deliverability to pick the right API for your AI agent. - [AI Mail: Dedicated Email APIs for Autonomous Agents](https://mails.ai/blog/ai-mail-dedicated-email-apis-autonomous-agents): How developers wire autonomous AI agents to dedicated email APIs — covering architecture, SPF/DKIM/DMARC, threading, parsing, and deliverability patterns. - [Mails.ai vs Resend vs Postmark for AI Agents (2025)](https://mails.ai/blog/mails-ai-vs-resend-vs-postmark-ai-agents): Side-by-side comparison of inbound parsing, MCP support, webhooks, and deliverability. See which transactional email API fits agentic workflows. - [What Is a .ai Email Address? How AI Agents Use Real Domains](https://mails.ai/blog/what-is-ai-email-address-how-ai-agents-use-real-email-domains): Provision @mails.ai inboxes, send transactional email, and receive inbound replies via webhook — one API for the full email loop. Read the docs and get started free. - [Email Deliverability for Automated and AI Senders](https://mails.ai/blog/email-deliverability-automated-ai-senders): Email deliverability for automated and AI senders explained: SPF, DKIM, DMARC, IP warming, reputation management, and sending patterns that keep agents out of spam. - [Unique Reply-To Address | Route Agent Replies Reliably](https://mails.ai/blog/unique-reply-to-address): Learn how a unique reply-to address lets each agent route replies, preserve threading, verify identity, and process inbound email safely. - [AI Email API vs Transactional Email API: Key Differences](https://mails.ai/blog/ai-email-api-vs-transactional-email-api): Learn what an AI email API is, how it differs from a transactional email API, and which architecture your agent or application actually needs. - [AI Email Automation: How Agents Send, Parse & Act on Email Autonomously](https://mails.ai/blog/ai-email-automation): Send transactional email and parse inbound replies in one API built for AI agents. Dynamic addresses, webhook delivery, thread tracking. Free tier available. - [B2B Contact Database Architecture for Agent-Driven Email](https://mails.ai/blog/b2b-marketing-database): How to design a contact database that supports agent-driven email workflows. Covers schema design, enrichment via inbound parsing, verification loops, and API integration patterns for B2B teams. - [B2B Leads Using SEO: How Search Traffic Converts with Agent-Driven Email](https://mails.ai/blog/b2b-leads-using-seo): How B2B teams use SEO to attract high-intent visitors and convert them into qualified pipeline using AI agent email workflows, structured reply handling, and automated follow-ups. - [Best B2B Demand Generation Tools for 2026](https://mails.ai/blog/b2b-lead-generation-tools-2026): Compare the top demand gen platforms and contact discovery tools B2B revenue teams use to fill pipeline and close more deals in 2026. - [AI Agent Transactional Email Patterns for Developers](https://mails.ai/blog/ai-agent-transactional-email-patterns): Learn how to send transactional email from an AI agent for OTPs, magic links, and notifications with secure, reliable delivery patterns. - [Top B2B Pipeline Tools for Revenue Teams in 2026](https://mails.ai/blog/b2b-lead-generation-tools): What B2B revenue teams actually use to find accounts, verify contacts, and fill pipeline — data providers, intent platforms, and enrichment tools compared. - [Transactional Email Pipeline: OTPs, Magic Links & Routing](https://mails.ai/blog/transactional-email-pipeline-otps-magic-links-notification-routing): Build a production-grade transactional email pipeline for AI apps: OTP delivery, magic link signing, notification routing, and deliverability mechanics explained. - [AI Email Automation for Developers: Triggers, Routing & Agent Actions](https://mails.ai/blog/ai-email-automation-developers-triggers-routing-agent-actions): A technical guide to AI email automation: transactional triggers, inbound routing pipelines, and agent actions — with code patterns and architecture advice for developers. - [AI Email API: Give Your AI Agent Its Own Email Address](https://mails.ai/blog/ai-agent-own-email-address): Learn how to provision a dedicated email address for your AI agent using DNS, SMTP, and inbound webhooks. Covers addressing, authentication, and thread management. - [Giving Your AI Agent an Inbox: Routing, Parsing & Webhooks](https://mails.ai/blog/ai-agent-inbox-inbound-email-routing-parsing-webhooks): Learn how to give your AI agent a real inbox: DNS routing, MIME parsing, webhook delivery, and idempotency patterns for production systems. - [AI Agent Email API: Send, Receive & Route via mails.ai](https://mails.ai/blog/email-automation-ai): Wire AI agents to transactional and inbound email in one API. Covers webhooks, classification, and routing. See the full pipeline guide on mails.ai. - [Sending Transactional Email from AI Agents: OTPs, Links, Notifications](https://mails.ai/blog/transactional-email-ai-agents-otps-sign-in-links-notifications): Learn how AI agents should send OTPs, magic links, and notifications with correct headers, idempotency keys, rate limits, and deliverability controls. - [Mails.ai vs AgentMail: Email API for AI Agents](https://mails.ai/blog/mailsai-vs-agentmail-email-api-ai-agents): Mails.ai vs AgentMail compared on architecture, pricing, MCP support, inbound parsing, and deliverability for AI agent email workflows. - [Parsing Email Attachments for LLM Ingestion](https://mails.ai/blog/parsing-email-attachments-for-llm): A technical guide to extracting, normalizing, and feeding email attachments into LLMs — covering MIME parsing, PDF extraction, OCR, and chunking strategies. - [Transactional vs AI Agent Email: Architectural Differences](https://mails.ai/blog/transactional-email-vs-ai-agent-email-architectural-differences): Deep dive into the core architectural differences between transactional email and AI agent email — threading, state, inbound parsing, and deliverability. - [Inbound Email Processing for AI Agents: Classification, Routing, Actions](https://mails.ai/blog/inbound-email-processing-ai-agents-classification-routing-actions): How AI agents classify, route, and act on inbound email: parsing raw MIME, intent classification, routing logic, and triggering deterministic actions reliably. - [RFC-Compliant Email Replies from AI Agents](https://mails.ai/blog/rfc-compliant-email-replies-ai-agents): Learn how AI agents can compose RFC 5322-compliant email replies with correct threading headers, MIME structure, and quoting conventions. - [Idempotent Email Sending for AI Agents: Code Guide](https://mails.ai/blog/idempotent-email-sending-for-ai-agents): Stop duplicate emails in agent retry loops. Implement idempotency keys with the mails.ai API — includes working Python and Node.js examples. Read the guide. - [How AI Agents Should Handle Email Replies](https://mails.ai/blog/how-ai-agents-handle-email-replies): A technical guide to threading, reply detection, context management, and response generation for AI agents that send and receive email. - [Building an Email-Driven Agent Workflow](https://mails.ai/blog/building-email-driven-agent-workflow): Learn how to build production-grade email-driven agent workflows: inbound parsing, state machines, threading, tool dispatch, and deliverability for automated senders. - [Structured Reply Events for Email Agents](https://mails.ai/blog/structured-reply-events-for-email-agents): Learn how to design structured reply events so your email agents can parse, route, and act on inbound replies with precision — covering schemas, threading, and idempotency. - [Email API for AI Agents: Architecture & Provider Guide](https://mails.ai/blog/email-api-for-ai-agents-architecture-provider-guide): Compare email API providers for AI agents. Covers MCP support, inbound parsing, deliverability, and architecture — with a clear recommendation for agent builders. - [How to Build an MCP Email Server for AI Agents](https://mails.ai/blog/how-to-build-mcp-email-server-for-ai-agents): Learn how to build an MCP email server that lets AI agents send, receive, and parse email via the Model Context Protocol — with real code and architecture. - [Inbound Email API for AI Agents — mails.ai](https://mails.ai/blog/webhook-based-inbound-email-processing-agents): Receive emails as webhook payloads in your AI agent: parsed headers, threaded messages, bounce handling. REST API with code examples. Free tier available. - [Transactional vs Agent Email Architecture](https://mails.ai/blog/transactional-vs-agent-email-architecture): Learn the core architectural differences between transactional and agent email systems—covering SMTP flows, inbound parsing, threading, webhooks, and MCP integration. ## Glossary - [Email](https://mails.ai/glossary/email): A message sent between addresses over the internet using SMTP — the foundational transport layer that AI agents use to communicate with humans and other systems. - [Agentmail](https://mails.ai/glossary/agentmail): Agentmail is the category of email infrastructure designed for AI agents — dedicated per-agent addresses, structured inbound parsing, prompt-injection scanning, and per-agent reputation, so agents can send and receive email without sharing a human inbox. - [Structured reply event](https://mails.ai/glossary/typed-event): A structured object representing an inbound email reply. injection_score + sender_reputation are computed on every event; intent, entities, and urgency are read from first-contact mail when opt-in classification is enabled on a paid plan. - [Injection score](https://mails.ai/glossary/injection-score): 0–1 risk score on every inbound structured reply event. Output of Mails.ai's six-category prompt-injection scanner. At 0.95 or higher the event is flagged quarantined. - [MCP server](https://mails.ai/glossary/mcp-server): Mails.ai's drop-in Model Context Protocol server. Distributed via npm as @mailsai/mcp-server. Exposes tools such as mails_send, mails_reply, mails_list_threads, mails_check_suppression and mails_get_reputation to MCP-capable runtimes — Claude Code, Cursor, Cline, Continue, Windsurf. - [Per-event metered pricing](https://mails.ai/glossary/per-call-mpp): Usage-based email pricing: every send or received message is billed at a per-event rate, invoiced at month-end, with no monthly minimum. Mails.ai does not offer it; its plans are monthly or yearly, with separate send and inbound allowances. - [Classifier](https://mails.ai/glossary/classifier): Mails.ai's check on every send before delivery: fixed rules, then an LLM judge, against a transactional-only policy. Each send's response carries classifier_score, and a refused send answers 422 with its reason. - [Sender reputation](https://mails.ai/glossary/sender-reputation): An agent's reputation score (0–1), built from real engagement and scoped to its workspace. Queryable today through the mails_get_reputation tool, which returns the agent's own score. - [Automatic Mail](https://mails.ai/glossary/automatic-mail): Email sent programmatically by an AI agent or automated system — triggered by logic, events, or schedules — without a human composing or approving each message. - [AI-powered email](https://mails.ai/glossary/ai-powered-email): Email that is composed, addressed, timed, and sent by an AI agent rather than a human — with replies routed back to the agent as structured events for further action. - [AI email content](https://mails.ai/glossary/ai-email-content): AI email content is message copy generated by an AI agent for a specific recipient, event, or workflow — then sent, measured, and improved through the email infrastructure around that agent. - [AI email agent](https://mails.ai/glossary/ai-email-agent): An AI email agent is an autonomous software agent that sends, receives, and acts on email on behalf of a user or system — composing messages, parsing replies, and taking follow-up actions without human intervention. - [AI email platform](https://mails.ai/glossary/ai-email-platform): An AI email platform is infrastructure that gives AI agents dedicated sending and receiving addresses, structured inbound parsing, prompt-injection scanning, and enforced outbound constraints — so an autonomous agent can participate in email conversations safely. - [AI email management](https://mails.ai/glossary/ai-email-management): AI email management is the practice of using autonomous agents — not humans — to send, receive, classify, route, and reply to email through a programmatic API, with infrastructure-level controls for reputation, injection scanning, and sending policy. ## Optional - [Sitemap](https://mails.ai/sitemap.xml): Full XML sitemap of all pages.