Comparisons
Best Email API for Next.js: 6 Options Compared
SendHQ, Resend, Postmark, Mailgun, Amazon SES and Nodemailer compared for Next.js route handlers, the Edge runtime, React Email and cost at 50k emails.
Published · Updated
TL;DR: For a Next.js app, pick an email API you can call with plain fetch from a route handler or server action, that tells you what happened after the send, and whose price fits your volume. SendHQ is our pick: a REST API that works in both the Node.js and Edge runtimes, $9/month for 50,000 emails, inbound email and delivery events on every plan. Resend has the smoothest React Email SDK, Postmark the longest default log retention, and Amazon SES the lowest raw price.
Start sending with SendHQ, or read the quickstart first.
What is the best email API for Next.js? It is the one that fits how Next.js runs server code: route handlers (app/api/.../route.ts) and server actions, sometimes on the Edge runtime, where native Node.js APIs are not available. HTTP APIs called with fetch work everywhere; SMTP libraries such as Nodemailer only work in the Node.js runtime. After that, the deciding factors are React Email support, webhooks for bounces and complaints, and cost at your volume. The six options below were checked against each provider's own docs and pricing pages on 2026-11-23.
How we judged
We scored each option on what a Next.js team hits in the first month:
- Runtime fit: does it work from a route handler on both the Node.js and Edge runtimes?
- React Email: can you send components built with React Email, natively or by rendering to HTML?
- Outcome visibility: signed webhooks or an events API for delivered, bounced and complained.
- Inbound: can the same provider receive replies?
- Price at 50,000 emails a month, from the provider's pricing page.
- Retry safety: idempotency keys, so a retried server action does not send twice.
Summary table
| Option | Edge runtime | React Email | Webhooks / events | Inbound | Price for 50k/month |
|---|---|---|---|---|---|
| SendHQ | Yes, REST with fetch | Render to HTML, send html | Yes, Standard Webhooks | Yes, every plan | $9 (Starter) |
| Resend | Yes, HTTP API and SDK | Native react param | Yes | Yes | $20 (Pro) |
| Postmark | Yes, HTTP API | Render to HTML | Yes | Pro and Platform | $66 to $87 (10k base plus overage) |
| Mailgun | Yes, HTTP API | Render to HTML | Yes | Inbound routes | $35 (Foundation) |
| Amazon SES | Via signed AWS requests | Render to HTML | Via SNS/EventBridge setup | Separate setup | About $8 (Essentials) |
| Nodemailer + SMTP | No, Node.js runtime only | Render to HTML | Depends on SMTP host | No | Free library, SMTP host extra |

1. SendHQ
SendHQ is an email API for sending and receiving email from products and AI agents, with one REST endpoint for sending: POST https://sendhq.cc/api/v1/emails with a Bearer key (sending docs). Because it is plain HTTP, it works from any Next.js runtime with the built-in fetch.
Best for: Next.js teams that want sending, inbound replies and delivery events in one place at a low fixed price.
What it does for Next.js specifically:
- No SDK to install. A route handler is about 20 lines:
// app/api/send/route.ts
export const runtime = "edge"; // also works on the default Node.js runtime
export async function POST(req: Request) {
const { to, userId } = await req.json();
const res = await fetch("https://sendhq.cc/api/v1/emails", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.SENDHQ_API_KEY}`,
"Content-Type": "application/json",
"Idempotency-Key": `welcome-${userId}`,
},
body: JSON.stringify({
from: "Acme <hello@mail.acme.com>",
to: [to],
subject: "Welcome to Acme",
html: "<h1>Welcome</h1><p>Your account is ready.</p>",
text: "Welcome. Your account is ready.",
}),
});
return Response.json(await res.json(), { status: res.status });
}- Retry-safe server actions. The
Idempotency-Keyheader (up to 200 characters) replays the stored response for an identical retry and returns 409 if the payload changed, so a double-submitted form does not send two emails. - React Email: SendHQ does not accept a
reactpayload. Render your component to an HTML string (and a text version) with React Email'srender()and sendhtmlandtext(migration notes). - Outcomes: webhooks for
email.sent,email.delivered,email.delivery_delayed,email.bounced,email.complained,email.failedandemail.received, signed with Standard Webhooks headers. There are no open or click events. - Inbound: create inboxes on your domain and get
email.receivedwebhooks (inbound docs).
Pricing: Starter Transactional $9/month for 50,000 emails and 25 verified domains; Scale $39/month for 200,000 (pricing).
Limits: no free plan or free allowance; no SDK and no SMTP relay; new workspaces start on a daily cap of 1,000 recipients that rises on healthy days, and a domain under 30 days old is limited to 500 Gmail recipients a day.
2. Resend
Resend is a developer email API with an official Node.js SDK and its own Next.js guide that sends from app/api/send/route.ts (Resend docs).
Best for: teams already building templates in React Email who want to pass a component straight to the send call.
Verified detail: the SDK takes a react: parameter, so react: EmailTemplate({ firstName }) sends a component without a manual render step. Plans include inbound email, SMTP relay and webhooks (Resend pricing).
Pricing: Free plan with a 100 emails/day limit and 3 domains; Pro $20/month for 50,000 emails.
Limits: 30-day data retention on Free, Pro and Scale; the Free plan has one webhook endpoint.
3. Postmark
Postmark is a transactional email service with an HTTP API and separate message streams for transactional and broadcast mail.
Best for: teams that want long message history and are fine paying more per email.
Verified detail: 45-day data retention by default, customizable up to 365 days on Pro and Platform; inbound email processing on Pro and Platform (Postmark pricing).
Pricing: Free 100 emails/month; Basic $15, Pro $16.50 and Platform $18 for 10,000 emails, with extra emails at $1.80, $1.30 and $1.20 per 1,000. At 50,000 emails that is $87, $68.50 or $66 using those published rates.
Limits: Basic has no inbound; 5 sending domains on Basic, 10 on Pro.
4. Mailgun
Mailgun is a long-running email API with REST and SMTP, inbound routes, tracking and webhooks.
Best for: teams that want both REST and SMTP and inbound routing rules.
Verified detail: every plan includes RESTful APIs, SMTP relay, tracking, analytics and webhooks; Basic includes 5 inbound routes (Mailgun pricing).
Pricing: Free 100 emails/day; Basic $15/month for 10,000; Foundation $35/month for 50,000 (first month free).
Limits: Basic has 1 custom sending domain, 1 API key and 1-day log retention.
5. Amazon SES
Amazon SES is AWS's raw sending service: the lowest price per email, with events, suppression handling and dashboards left to you.
Best for: teams already on AWS, at high volume, with time to build the plumbing.
Verified detail: SES moved to plans in 2026. New accounts start on Essentials from July 21, 2026, at $0.16 per 1,000 emails up to 10 million; Pro is $0.22 per 1,000 plus $105 a month (SES pricing). Many older articles still quote $0.10 per 1,000.
Pricing: about $8 for 50,000 emails on Essentials.
Limits: requests must be signed with AWS credentials; delivery events need SNS or EventBridge wiring; inbound is a separate setup.
6. Nodemailer with an SMTP provider
Nodemailer is the standard SMTP library for Node.js (nodemailer.com). It is a library, not a sending service: you still need an SMTP host.
Best for: apps that already have SMTP credentials and run route handlers on the Node.js runtime.
Verified detail: Nodemailer opens raw TCP/TLS connections through Node.js APIs, and the Next.js Edge runtime does not support native Node.js APIs (Next.js Edge docs). Keep the route on runtime = "nodejs".
Pricing: the library is free; the SMTP host sets the price.
Limits: no events API of its own, and SMTP from serverless functions means a new connection per invocation.
Which email APIs work on the Next.js edge runtime?
Any provider you call over HTTPS with fetch works on the Edge runtime: SendHQ, Resend, Postmark and Mailgun all do. Amazon SES works if your request signing library runs without Node.js APIs. Nodemailer does not, because SMTP needs Node.js sockets.

Can I use Nodemailer in Next.js?
Yes, in route handlers and server actions on the Node.js runtime, which is the default. Do not set export const runtime = "edge" on that route, and never import it into a client component.
Which support React Email?
All of them. React Email components render to an HTML string with render(), and every provider here accepts HTML. Only Resend accepts the component directly through its SDK's react parameter; with SendHQ, Postmark, Mailgun, SES and Nodemailer you render first and send html plus a text version.
What does each cost at 50k emails?
At list prices on 2026-11-23: Amazon SES about $8, SendHQ $9, Resend $20, Mailgun $35, Postmark $66 to $87 depending on plan. Run your own volume through the email cost calculator, and see the cost per 100k emails comparison for the next tier.
How to choose
- You want one low fixed price, inbound replies and delivery events from fetch: SendHQ.
- Your templates are React Email and you want zero glue code: Resend.
- You need a year of message history: Postmark Pro or Platform.
- You need SMTP and REST from one vendor: Mailgun.
- You are on AWS at millions of emails a month: Amazon SES.
- You already have an SMTP host and stay on the Node.js runtime: Nodemailer.
Our recommendation for most new Next.js apps is SendHQ: it needs no SDK, works on every runtime, protects server-action retries with idempotency keys and costs $9 for 50,000 emails. For a step-by-step Node.js setup, read how to send transactional email from Node.js, then secure your inbound webhooks. Coming from Resend? See Resend-compatible email APIs.
FAQ
Should I send email from a server action or a route handler?
Either works; both run on the server. Use a server action for form submits in your own app and a route handler when something outside the app (a webhook, a cron job) triggers the send. Never call an email API from a client component: the key would ship to the browser.
Where do I store the API key in Next.js?
In a server-only environment variable such as SENDHQ_API_KEY, without the NEXT_PUBLIC_ prefix, so it is never bundled into client code.
How do I stop a double-submitted form sending two emails?
Send an Idempotency-Key derived from the event, such as welcome-<userId>. SendHQ replays the first response for an identical retry instead of sending again.
Does an accepted send mean the email was delivered?
No. A 201 means the provider accepted it. Delivery, bounce and complaint come later as events or webhooks.
Is there a free email API for Next.js?
Resend (100/day), Postmark (100/month) and Mailgun (100/day) have free tiers. SendHQ has no free plan; it starts at $9/month.
Ready to wire it up? Start sending with SendHQ and follow the quickstart to send your first email from a verified domain.