Outbound email

Send and reply from agent inboxes via Resend — threads, console UI, and MCP mailagent_send_message. Inbound-only works without this setup.

Check status

GET /v1/me
→ capabilities.outbound { enabled, verifiedFrom, hint }

enabled — Resend API key on Worker. verifiedFromOUTBOUND_FROM set (recommended for deliverability).

1. Verify a send domain in Resend

  1. Resend Dashboard → Domains → Add domain (e.g. webmailagent.com)
  2. Add DNS records (SPF, DKIM) until status is verified
  3. Pick a From address on that domain, e.g. noreply@webmailagent.com

2. Set Worker secret

npx wrangler secret put OUTBOUND_FROM
# paste: noreply@yourdomain.com
# or: MailAgent <noreply@yourdomain.com>

Self-host: add to .dev.vars and redeploy.

3. Send via API

POST /v1/inboxes/:id/send
Authorization: Bearer <API_KEY>
Content-Type: application/json

{
  "to": "user@example.com",
  "subject": "Hello from agent",
  "text": "Plain body"
}
POST /v1/inboxes/:id/messages/:messageId/reply
{ "text": "Thanks — replying in thread" }

Reply-To on outbound messages is the inbox address. Threads: GET …/threads.

Console UI

Console inbox — send/reply forms when outbound is enabled. Dashboard shows a banner until verifiedFrom is true.

MCP

mailagent_send_message
mailagent_list_threads

Without OUTBOUND_FROM

Resend may still send using the inbox address as From, but many providers block unverified senders. For production agent mail, always set OUTBOUND_FROM on a verified domain.

More