How to give an AI agent its own email address

Every integration your agent has today is one you gave it. Email is the exception: it is the one channel where the outside world can start the conversation. A customer replies to a quote, a vendor sends an invoice, a candidate asks about an interview. If your agent has no address, none of that reaches it, and a person has to paste the message into a chat window before any automation can begin.

8 min read

An agent inbox with a threaded conversation open
An agent inbox: the same threads a person would see, with every send recorded.

Giving an agent an address sounds like a five minute job. Create a mailbox, hand over IMAP credentials, done. That version works for about a week. This is what the week after looks like, and what to build instead.

What an agent actually needs from email

  • A stable identity. One address that belongs to one agent, so replies come back to the same place and recipients recognise the sender across months.
  • Threads, not messages. Answering "yes, Tuesday works" requires the previous four messages. An agent that fetches a flat list of mail cannot hold a conversation.
  • Blocking waits. Most agent runs are short and most email conversations are not. Something has to hold the thread open between "I asked" and "they answered" without burning a session for six hours.
  • Memory between runs. The second conversation with someone should start from what the first one learned, or the agent will ask for an order number it was given last Tuesday.
  • Deliverability that is already solved. SPF, DKIM, DMARC, warmed sending, bounce and complaint handling. None of it is agent-specific and all of it decides whether the mail arrives.
  • Oversight. A person needs to see every message, take over any thread, and stop a bad pattern before it becomes a domain reputation problem.

Miss the first three and the agent cannot do the job. Miss the last three and it will do the job in a way you regret.

Why IMAP and SMTP are the wrong shape

IMAP is a protocol for a mail client. It gives you folders, flags, and RFC 5322 blobs, and it expects a long-lived process to sit there and sync. An agent is not a long-lived process, and a model reasoning over a raw MIME tree is a token bill with no upside. You end up writing the same adapter every time: parse the multipart body, find the text part, strip the quoted history, reassemble the thread from References headers, work out what is new since the last run.

Then there is the credential. IMAP means a password with full mailbox access sitting in your agent config, with no scope, no per-agent boundary, and no way to express "this agent may reply but may not start conversations with strangers". The three-way comparison of shared credentials, forwarding aliases, and dedicated identities is worked through in agent inbox or shared mailbox.

The tool-shaped version

What an agent wants is a handful of verbs that match what it is trying to do. Send this. Reply in this thread. Show me the thread. Wait until they answer. With MCPmailer those are MCP tools, so any MCP-capable client picks them up from one block of config.

JSON
{
  "mcpServers": {
    "mcpmailer": {
      "type": "http",
      "url": "https://connect.mcpmailer.com/mcp",
      "headers": { "Authorization": "Bearer mmk_live_..." }
    }
  }
}

The key is scoped to one agent identity, and that scope decides what every tool can reach: two agents in the same workspace cannot read each other's mail unless you grant it. Client-specific variants are on the Claude, ChatGPT, Vercel AI SDK, LangChain, OpenAI Agents SDK, n8n, OpenClaw, Hermes, and Cloudflare Agents SDK pages, and there is a full walkthrough in how to let Claude send and receive email. Stacks that do not speak MCP use the same keys against the REST API.

send_email {
  to: ["anna@customer.com"],
  subject: "Re: Refund for order 4012",
  body: "Hi Anna, your refund was issued today and should arrive within 3 business days."
}

Bodies are markdown and go out as text plus HTML, so the agent writes the way it already writes and the recipient gets a normal-looking email.

An agent calling the send_email tool and receiving a message id back
Four verbs cover most of the work: send, reply, get the thread, wait for the answer.

Threads are the unit of work

The most common cause of a bad agent reply is answering the message instead of the conversation. get_thread returns the whole exchange, in order, already stripped of the quoted history that would otherwise triple the token count and confuse the model about who said what.

How the headers behind that actually work, and the four ways agents break them, is in how email threading works. This matters most in exactly the situations where a wrong answer is expensive. "Still not working" after three troubleshooting steps. "The second option" when two were offered. "Same as last time" from a customer who ordered in March. None of those parse in isolation.

A threaded email conversation between an agent and a customer
Threads are the unit of work. Individual messages are rarely enough context to answer.

Waiting is a feature, not a loop

The tool that changes what is possible is wait_for_reply. It parks the conversation server-side and returns when the other party writes back or when the timeout expires. The agent does not poll, and you do not need a scheduler waking it every ten minutes to check.

send_email { to: ["lead@prospect.io"], subject: "Demo times", body: "..." }
wait_for_reply { thread_id: "thr_...", timeout_seconds: 86400 }
reply_all { message_id: "msg_...", body: "Booked for Tuesday at 10:00." }

Pick the timeout deliberately. A day or two suits a warm inbound lead. A week suits a candidate mid-process. When it expires, the correct behaviour is usually one follow-up and then silence, which is the difference between a useful agent and one that generates complaints.

Memory is what makes the second conversation good

An agent with an inbox but no memory restarts every relationship from zero. Three tools fix that, and they are the ones people discover last: lookup_contact for who this address belongs to, remember_about_contact for a fact worth keeping, and notes for workspace knowledge that is not about one person. Contacts are shared across the workspace, so what a support agent learns is available to a sales agent when you allow it.

The practical effect is that the agent stops asking questions you already have answers to, which is the most irritating trait of automated email. What is worth recording and what is not is worked through in giving an email agent memory, and the tools are in contacts, notes, and vault.

The part everyone underestimates: deliverability

An agent that writes beautiful email to the spam folder has accomplished nothing. Authentication is the floor: SPF, DKIM signing on the sending domain, and a DMARC policy that aligns with both. Put agents on a subdomain like agents.yourcompany.com so their sending reputation is separate from the mail your people send.

Above the floor sits behaviour, and this is where agents differ from humans. They are fast, tireless, and perfectly willing to send the same message to two hundred addresses. Mailbox providers read that as bulk. The defence is structural: cap recipients per message, meter every send against a daily and monthly allowance, and treat first contact differently from a reply, since one was invited and the other was not. The full treatment is in deliverability for agent senders, and the DNS side is in domains.

DNS records for SPF, DKIM, and DMARC on an agent subdomain
Published on a subdomain and verified once. The domains chapter has the exact values.

Keeping a human in the loop

The failure mode of agent email is not a badly written sentence. Models write polite email. It is volume in a direction nobody reviewed. Two controls handle most of it.

First, every message in and out is recorded against an identity and visible in a dashboard a person can read, and any thread can be taken over by a human mid-conversation. Second, sends are metered against an allowance and first contact is classified as a cold send, which carries an unsubscribe link and is watched by the duplicate-content and velocity tripwires.

A reply is invited and a first contact is not, so they are classified differently and only one of them can quietly become a campaign. That distinction is where the controls attach.

More controls, including per-identity mail rules and what to do about bounces, are in keeping an autonomous agent from becoming a spam problem.

Which agent to build first

The use cases people actually ship, in rough order of how quickly they pay for themselves.

Use caseWhy it worksWhere to start
Support repliesHigh volume, low variety, all inboundSupport agents, build guide
Invoice chasingThe reply is the work, and it is worth moneyInvoice chasing, build guide
Inbound lead follow-upSpeed converts, and the mail is invitedSales agents, build guide
Interview coordinationPure ping-pong, low judgementRecruiting agents, build guide
Meeting schedulingGeneralises the coordination loopScheduling agents
A personal assistantYou can delegate to it rather than approve its draftsBuild guide

All five are inbound-first, which is not a coincidence. Inbound is where agents are both most useful and least dangerous. The cases where an agent is the wrong answer entirely are in when an email agent is the wrong answer.

A realistic first day

  1. Create a workspace. You get a working subdomain immediately, so you can test before touching DNS. An agent with no human account can provision one itself.
  2. Create an agent identity and pick its address, for example support@you.mcpmailer.email.
  3. Paste the API key into your MCP client config, or use the REST API if your stack is not MCP.
  4. Send one message to yourself and reply to it, so you see the thread from both sides.
  5. Point one narrow category of real mail at it and read every thread for a week.
  6. Add your own domain, verify the DNS records, and move the identity across.

Step five is the one people skip and the one that matters. The plumbing takes minutes; deciding what your agent should do when a message arrives is the actual project. Start with the quickstart, or read the tools if you would rather see the whole surface first.

Questions

Can an AI agent have its own email address?
Yes. It needs a mailbox bound to its own identity, tools for sending and reading threads, and authenticated sending on a domain you control. With MCPmailer an agent gets an address on your domain or an instant one on a mcpmailer.email subdomain, reachable over MCP or REST.
Should an agent use my existing shared inbox?
Usually not. Shared credentials mean no per-agent scope, no separate sending reputation, and no clean audit of who sent what. For a read-only prototype it is fine; for anything that sends, use a dedicated identity.
How does the agent handle replies that arrive hours later?
It calls wait_for_reply, which blocks server-side and returns when the reply lands or the timeout expires. No polling loop and no external scheduler.
Will mail from an agent land in spam?
Not because it came from an agent. It lands in spam for the usual reasons: missing or unaligned authentication, a cold domain, or bulk-looking behaviour. Authenticate the sending subdomain and keep cold volume low and specific.
How much of this can I do without my own domain?
All of it, to start. A workspace gets a working mcpmailer.email subdomain, so you can build and test the entire flow, then add your own domain when the agent is doing something you want your brand on.
What happens when the agent tries to do something it should not?
The call is refused with a reason it can act on, such as daily_send_quota_exhausted with a reset time, rather than silently succeeding or failing. Limits are enforced under the tool, not in the prompt.

Give your agent an address it can answer from.

Create an inbox