Migrate from Resend.
Same developer-first DX. Same disclosure-based AUP. New: typed reply events, native injection scanning, per-agent reputation, MCP-native distribution. ~30 minutes of changes, mostly inbound-side.
You keep what Resend got right. You stop doing the inbound work yourself.
- Send-side is a near-drop-in. Both APIs run on AWS SES under the hood. SDK shape is similar; method names differ.
- Inbound goes from raw → typed. Stop calling your own classifier on every reply.
event.intentis pre-computed. - Pricing is parallel at low volume, beats Resend on parses at scale. Pro $20 = 50K sends + 50K parses (Resend Pro $20 = 50K sends only, parses are DIY).
- Both AUPs allow B2B prospecting under disclosure + unsub + company-email rules. We modeled ours on theirs.
Send + receive, side by side.
// Resend — send + inbound webhook with raw body parsing
import { Resend } from "resend";
const resend = new Resend(process.env.RESEND_KEY);
await resend.emails.send({
from: "sarah@yourcompany.com",
to: "lead@example.com",
subject: "Demo",
html: "<p>...</p>",
});
// Inbound webhook posts the raw message — you parse it yourself.
app.post("/webhook/inbound", async (req, res) => {
const { text, from, subject } = req.body;
const intent = await myClassifier(text); // your own LLM call
const entities = await myEntityExtractor(text); // your own LLM call
// ...
});// Mails.ai — send + typed reply event
import { mails } from "@mailsai/sdk";
const agent = mails.agent("sarah", { domain: "yourcompany.com" });
await agent.send({
to: "lead@example.com",
subject: "Demo",
body: "...",
});
// Inbound arrives as a typed reply event — classifier output is built-in.
agent.onReply((event) => {
// event.intent => "schedule_demo"
// event.entities => { date, time }
// event.urgency => 0.8
// event.injection_score => 0.02
// event.sender_reputation => 0.91
});What maps to what.
| Resend | Mails.ai | Notes |
|---|---|---|
| POST /emails | POST /v1/messages | Same shape; add agent_id field on Mails.ai for per-agent reputation. |
| GET /domains | GET /v1/domains | Both verify DKIM CNAMEs + SPF + DMARC TXT. Wizards are equivalent. |
| Inbound webhook (raw) | GET /v1/events + webhook | Mails.ai inbound is pre-classified into a structured reply event — no parsing in your code. |
| GET /audiences | (n/a — different product) | Resend Marketing is a separate product. Mails.ai is single-product transactional API + agent inbox primitive. If you use Resend Audiences for broadcast, keep using it; Mails.ai doesn't compete on broadcast. |
| Stripe billing (per-1K rates) | Stripe billing — Metered tier (coming soon: $0.001/send + $0.002/inbound (+$0.003 opt-in classify)) | On Metered (coming soon), sends bill at commodity rate (matches Resend's effective per-1K); parses at LLM-value rate (covers built-in classifier cost). |
The questions engineers actually ask.
Will my domain verification carry over?
No — DKIM CNAMEs are provider-specific. Add the three Mails.ai-side CNAMEs alongside your existing Resend records during the dual-run phase; remove the Resend records after you're confident your traffic has fully cut over. SPF / DMARC TXT records get amended (not replaced) so both providers can sign simultaneously during transition.
Can I keep using Resend for broadcast and Mails.ai for transactional?
Yes — they're different products. Resend Marketing handles audience broadcasts; Mails.ai handles agent-triggered transactional and inbox automation. Keep both; route per use case.
What about the disclosure / unsub rules?
Same as Resend's AUP — every send must include a valid sender address, your company name, an explicit disclosure of why you're contacting the recipient, and an unsubscribe mechanism honored within 7 days. Organizational addresses only (not personal). Auto-suspension at 0.3% complaint rate kicks in regardless. We modeled our AUP on Resend's because we like how they handle it.
Can I evaluate Mails.ai without paying — staying under the 3K free-tier cap?
Yes — both free tiers are 3K events/month, so a dual-run evaluation fits inside the free tier on both sides. As you scale, Mails.ai Pro $20 = 50K sends + 50K parses (Resend Pro $20 = 50K sends only), so the value-add is the included parse capacity for the same monthly dollar.
Built for agents.
Self-serve at every volume.
Public API opens Q3 2026. Drop ~6 lines into your agent and ship.
$ npm install @mailsai/sdk