For the complete site index, see llms.txt. Docs index: llms-docs.txt. Marketing corpus: llms-full.txt. Docs corpus: llms-full-docs.txt. Prefer markdown URLs where available (append .md).. Product skill: skill.md. Pricing: pricing.md. Docs MCP: /docs/mcp. Site MCP: /mcp.

All articles
Tutorials//BY Reloop Labs

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

6 MINUTES READ

Summary

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
1"use server";
2
3import { Reloop } from "reloop-email";
4
5const reloop = new Reloop(process.env.RELOOP_API_KEY!);
6
7export async function sendWelcomeEmail(email: string) {
8 await reloop.emails.send({
9 from: "onboarding@yourdomain.com",
10 to: email,
11 subject: "Welcome",
12 html: "<p>Thanks for signing up.</p>",
13 });
14}

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.