Blog

Send email from Claude, Cursor and Codex

Let Claude, Cursor, or Codex send, reply to, forward, and schedule email from your Gmail, Outlook, or IMAP mailbox. Review each message before it goes out.

Richard Chu

Fluxmail Founder

5 min read

A paper airplane lifting off from an open envelope, with a glowing light at its nose

Claude, Cursor, and Codex can send email from your Gmail, Outlook, or IMAP mailbox once you connect it with Fluxmail, an email MCP server.

1. Give the agent permission to send

Fluxmail treats sending as a separate permission, mail.send. An agent without it can read and draft but can't send.

Fluxmail Cloud. Add https://cloud.fluxmail.ai/mcp to your client and sign in. When Fluxmail asks you to approve the connection, Send emails is checked along with the other permissions. Leave it checked to allow sending, or uncheck it so the agent can draft but not send. The Cloud MCP guide has setup steps for Claude, Claude Code, Cursor, Codex, and other clients.

Self-hosted Fluxmail. The permission comes from the profile Fluxmail starts with. The setup commands on our integration pages use read-only. Use full to allow sending. For Claude Code:

claude mcp add fluxmail -- fluxmail stdio --profile full

For Codex:

codex mcp add fluxmail -- fluxmail stdio --profile full

If you already added Fluxmail with another profile, remove it first with claude mcp remove fluxmail or codex mcp remove fluxmail. For Cursor, change the profile in mcp.json:

{
  "mcpServers": {
    "fluxmail": {
      "command": "fluxmail",
      "args": ["stdio", "--profile", "full"]
    }
  }
}

The read-write profile lets the agent write drafts and organize mail without sending. Permissions lists what each profile allows.

2. Ask for a draft first

Until you trust how the agent writes, have it save a draft and send only after you've read it:

Reply to the latest email from Dana about the Q3 invoice. Say we'll pay by
Friday and ask for the PO number. Save it as a draft and show me the text.
Don't send it.

The agent writes the reply with create_draft and passes the original message's ID, so the reply stays in the thread and quotes Dana's message. The draft also appears in your mail app's Drafts folder. When it reads well, say so:

Send that draft.

The agent calls send_email with the draft's ID. The message goes out from your own address, in the same thread. In Cloud, sending a saved draft needs both Send emails and Manage drafts, and Full mail access includes both. The self-hosted full profile covers it too.

3. Check recipients before sending

On a reply-all, Fluxmail takes the recipients from the original thread, and on a forward the agent picks them from your request. Ask for a preview when you want to see them first:

Preview a reply-all to that thread and wait for me to confirm before sending.

preview_send returns the sender, recipients, subject, and attachments the send would use, without sending anything.

Your client adds its own check. Claude Code asks before it runs a tool you haven't allowed yet. A rule that allows every Fluxmail tool, such as mcp__fluxmail in your Claude Code settings, also allows send_email and forward_email once the profile permits sending. Allow the read tools by name instead, such as mcp__fluxmail__list_emails, so Claude Code still asks before each send.

4. Schedule a send

Give the agent a time:

Send the weekly update to the team on Monday at 9am Eastern.

Fluxmail saves the message as a draft in your mailbox right away and sends it at that time. Ask "what emails do I have scheduled?" to see what's waiting. To stop one, ask the agent to cancel it. Canceling keeps the draft, so you can edit it and send it yourself.

In Cloud, a scheduled message is sent with the agent's own connection, so the send time has to fall within that connection's approval, which lasts at most 90 days. If you revoke the connection before then, the send fails and the draft stays in your mailbox.

Self-hosted Fluxmail delivers scheduled mail only while fluxmail serve or fluxmail scheduled run is running. Claude Code, Cursor, and Codex start Fluxmail over stdio, which doesn't deliver scheduled mail, so keep a worker running on the same computer:

fluxmail scheduled run

Messages wait in the queue while the worker is stopped, and overdue messages can go out as soon as it starts again. Sending and retries covers running it in the background.

What if a send times out?

Each send carries an idempotency key that the agent generates. If the connection drops before the agent sees the result, the agent repeats the request with the same key. Fluxmail returns the saved result if the message went out, and returns an error instead of sending again if the outcome is uncertain. In that case, check your Sent folder before sending anything new. Sending and retries explains each status, and the Cloud sending guide covers how Cloud handles it.

Frequently asked questions

Can Claude send email from Outlook?

Yes. Connect your Outlook or Microsoft 365 mailbox to Fluxmail, then ask Claude to send as you would with Gmail.

Can the agent send attachments?

Yes. The agent includes each file's contents in its call to send_email, so this suits documents and other small files. A large file can be more than your client lets the agent pass in one call. forward_email includes the original message's attachments unless you leave them out.

Will the email come from my address?

Yes. Fluxmail sends through your own Gmail, Outlook, or IMAP account, so recipients see your address and replies come back to your inbox. If your mailbox has other addresses you can send from, the agent can list them with list_send_as and use one.

Can I undo a send?

No. You can cancel a scheduled send until it starts, so if you want time to change your mind, have the agent schedule messages a few minutes ahead or save drafts instead.

How do I stop an agent from sending?

In Cloud, connect again without Send emails, then revoke the old connection in Connections. With self-hosted Fluxmail, remove it and add it again with the read-write or read-only profile.

Next steps

Try Fluxmail Cloud

Connect your AI agent to your Gmail, Outlook, or IMAP email accounts.