Transactional email in Next.js

Add order confirmations, password resets, and notifications to a Next.js app with one function call — no templates to design, no dashboard to babysit.

Most transactional email in Next.js means picking a provider, designing an HTML template, wiring an SDK, and then editing that template by hand every time the product changes. The copy drifts from what the app actually does.

Sendable inverts it: you describe the event, and it writes the subject and body and sends it. A new message type is a new string, not a new template.

Install

npm i sendableme

Set SENDABLE_API_KEY in your .env.local. Get a free key — 500 messages a month, no card.

Send from a Route Handler

// app/api/checkout/route.ts
import { send } from 'sendableme';

export async function POST(req: Request) {
  const { email, orderId } = await req.json();

  await send(email, 'order_shipped', { orderId, eta: 'Friday' });

  return Response.json({ ok: true });
}

That's the whole integration. No template, no dashboard step. Sendable composes the message from the event name and your field names.

Send from a Server Action

// app/actions.ts
'use server';
import { send } from 'sendableme';

export async function signUp(email: string) {
  // ...create the user...
  await send(email, 'account_created', { plan: 'free' });
}

Test mode (compose without delivering)

Use a key that starts sk_test_. It composes the message and returns the copy in the response, but sends nothing — safe for local dev and CI.

Why it's different from a template

The model that writes the copy never sees your values — only your field names. Your data is substituted in afterwards, verbatim, so a price or a reset link can't be altered. A second model checks every draft for claims your data doesn't support and refuses rather than guess.

Translation: you get written, on-brand email without a template file, and the parts that must be exact (amounts, links) always are.

Honest limitations

Get started

One function call, free to try:

Get your free API key →

500 messages a month, no card required.