How to Send Email in Next.js App Router (2026)

Reloop Labs

Send transactional email from Next.js App Router using Reloop's Node.js SDK in Server Actions and Route Handlers.

Install the SDK

Run npm install reloop-email and add RELOOP_API_KEY to .env.local. Never expose the key to the client—send only from server components, Server Actions, or Route Handlers.

bash
npm install reloop-email

Server Action example

Create a sendWelcomeEmail action that calls reloop.emails.send after signup. Return success or error to the client without leaking API details.

typescript
"use server";

import { Reloop } from "reloop-email";

const reloop = new Reloop(process.env.RELOOP_API_KEY!);

export async function sendWelcomeEmail(email: string) {
  await reloop.emails.send({
    from: "onboarding@yourdomain.com",
    to: email,
    subject: "Welcome",
    html: "<p>Thanks for signing up.</p>",
  });
}

Deploy on Vercel

Add RELOOP_API_KEY to Vercel environment variables. The HTTP API works on Edge Runtime where SMTP does not.

Ready to integrate?

SDKs for Node.js, Python, Go, and more. Send your first email in under five minutes.

Start building