# Reloop Marketing (full) > Full-document snapshot of Reloop marketing site content for long-context agents. > Site index: https://reloop.sh/llms.txt > Product docs corpus: https://reloop.sh/llms-full-docs.txt > Docs index: https://reloop.sh/llms-docs.txt > Product skill: https://reloop.sh/skill.md Generated from 6 pages. --- # Pricing Path: /pricing URL: https://reloop.sh/pricing Markdown: https://reloop.sh/pricing.md # Pricing — Reloop > Scale your email. Control your costs. Hosted Reloop or self-host. > HTML page: https://reloop.sh/pricing ## Plans ### Free - Price: $0 / month - Note: Free for everyone - Description: For side projects and getting started with Reloop. - Emails: 3,000 emails / month - CTA: Get started → /dashboard/signup - Features: - 3,000 emails / month - 200 emails / day - 1 agent inbox - 1 webhook - 1 custom domain - 1 MB attachments - Data retention (45 days) - Community support ### Individual - Price: $10 / month - Note: /month - Description: For solo developers and personal projects. - Emails: 25,000 emails / month - Overage: Extra emails: $0.80 / 1,000 - CTA: Get started → /dashboard/signup - Features: - 25,000 emails / month - No daily limit - 5 agent inboxes - 5 webhooks - 5 custom domains - 5 MB attachments - Data retention (45 days) - Dedicated support ### Startup - Price: $20 / month - Note: /month - Description: For early-stage founders and growing teams. - Emails: 50,000 emails / month - Overage: Extra emails: $0.80 / 1,000 - CTA: Get started → /dashboard/signup - Features: - 50,000 emails / month - No daily limit - 10 agent inboxes - 10 webhooks - 10 custom domains - 5 MB attachments - Data retention (45 days) - Dedicated support ### Enterprise - Price: Custom - Note: Custom volume & billing - Description: Custom volume, security reviews, and dedicated support. - Emails: Custom volume - CTA: Contact sales → /contact - Features: - Custom email volume - No daily limit - Custom agent inboxes - Custom webhooks - Custom domains - Custom attachments - Data retention (45 days) - Dedicated support & SLA ## Self-host Self-hosting the open-source Reloop stack is free (infrastructure costs are yours). See https://reloop.sh/docs/self-host ## Related - Signup: https://reloop.sh/dashboard/signup - Docs index: https://reloop.sh/llms-docs.txt - Contact sales: https://reloop.sh/contact --- # Reloop Path: / URL: https://reloop.sh Markdown: https://reloop.sh/index.md # Reloop > High-performance, open-source email infrastructure—the same service as proprietary platforms. Use Reloop hosted or deploy it yourself. Reloop is email infrastructure for developers: transactional and marketing email, real-time webhooks, inbound processing, analytics, and an agent-ready API. ## Why Reloop - **Open source** — same product you can self-host or use hosted - **Developer-first** — REST API, SMTP relay, official SDKs, CLI, MCP - **Agent-ready** — API keys, inbound agent inbox, docs as markdown / llms.txt ## Get started - Hosted signup: https://reloop.sh/dashboard/signup - Pricing: https://reloop.sh/pricing.md - Documentation index: https://reloop.sh/llms-docs.txt - API keys guide: https://reloop.sh/docs/learn/ai/api-keys.md - GitHub: https://github.com/reloop-labs/reloop ## Product surfaces | Area | URL | |------|-----| | Features | https://reloop.sh/features | | Developers | https://reloop.sh/developers | | Blog | https://reloop.sh/blog | | Compare | https://reloop.sh/compare | | Glossary | https://reloop.sh/glossary | | Changelog | https://reloop.sh/changelog | --- # About Reloop Path: /about URL: https://reloop.sh/about Markdown: https://reloop.sh/about.md # About Reloop Reloop Labs builds open-source email infrastructure for developers and AI agents. ## What we build - Hosted email API and SMTP relay at reloop.sh - Self-hostable open-source stack - Agent skills, MCP server, and agent-friendly documentation ## Links - Site: https://reloop.sh - Docs index: https://reloop.sh/llms-docs.txt - Careers: https://reloop.sh/careers - Contact: https://reloop.sh/contact - GitHub: https://github.com/reloop-labs/reloop --- # Developers Path: /developers URL: https://reloop.sh/developers Markdown: https://reloop.sh/developers.md # Developers Reloop is built for developers who need reliable transactional email, webhooks, and SMTP. ## Quick links - Docs index: https://reloop.sh/llms-docs.txt - API reference: https://reloop.sh/docs/api - SDKs: https://reloop.sh/docs/resources/sdks - Languages: https://reloop.sh/languages - API keys (agent): https://reloop.sh/docs/learn/ai/api-keys.md - MCP server: https://reloop.sh/docs/integrations/ai-tools/mcp-server - Product skill: https://reloop.sh/skill.md ## Auth - Header: `x-api-key: ` - Key prefix: `rl_` ## Install product MCP ```bash npx -y reloop-mcp # env: RELOOP_API_KEY=rl_... ``` --- # How to Send Email in Next.js App Router (2026) Path: /blog/send-email-nextjs-app-router URL: https://reloop.sh/blog/send-email-nextjs-app-router Markdown: https://reloop.sh/blog/send-email-nextjs-app-router.md Send transactional email from Next.js App Router with Reloop — complete Server Action and Route Handler examples, env setup, error handling, and Vercel deploy. **To send email in Next.js App Router, call Reloop only on the server** — from a [Server Action](https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations) or a [Route Handler](https://nextjs.org/docs/app/building-your-application/routing/route-handlers). Never put your API key in a Client Component or public env var. This guide covers both patterns end-to-end: install, shared client, form + Server Action, API route + `fetch`, error handling, and deploy on Vercel. --- ## What you will build | Approach | Best for | File shape | |----------|----------|------------| | **Server Action** | Forms, signup, password reset, any UI in the same Next app | `app/actions/send-email.ts` + client form | | **Route Handler (API)** | Webhooks, mobile clients, external services, cron, AI tools | `app/api/send-email/route.ts` | Both run on the server. Both use the same Reloop SDK call. Pick Server Actions for app UI. Pick Route Handlers when something outside your React tree needs HTTP. --- ## Prerequisites 1. A Next.js app on the **App Router** (this guide uses `app/`, not `pages/`) 2. A Reloop account and API key from the [dashboard](https://app.reloop.sh) (keys look like `rl_…`) 3. A verified sending domain — see [connect a domain](/docs/guides/connect-domain) and [SPF / DKIM / DMARC](/blog/spf-dkim-dmarc-setup-guide) Optional but useful: the [Node.js SDK docs](/docs/examples/nodejs/nextjs) and full [send mail API](/docs/api/mail/post-api-mail-v1send). --- ## 1. Install the SDK Package: [`reloop-email`](https://www.npmjs.com/package/reloop-email) · source: [reloop-labs/reloop-node](https://github.com/reloop-labs/reloop-node) --- ## 2. Add the API key (server only) Create or edit `.env.local` in the project root: ```env RELOOP_API_KEY=rl_your_api_key_here ``` Rules that matter: - Use `RELOOP_API_KEY` (no `NEXT_PUBLIC_` prefix). Public vars are bundled into the browser. - Do not commit `.env.local`. Keep it in `.gitignore`. - On Vercel, add the same key under **Project → Settings → Environment Variables** (see [Vercel integration](/docs/integrations/vercel)). If the key appears in browser Network tabs or client bundles, treat it as leaked: rotate it in the dashboard and redeploy. --- ## 3. Create a shared Reloop client One client file keeps Server Actions and Route Handlers identical. ```typescript // lib/reloop.ts if (!process.env.RELOOP_API_KEY) { throw new Error("Missing RELOOP_API_KEY"); } apiKey: process.env.RELOOP_API_KEY, }); ``` Initialize with an object: `{ apiKey: string }`. Optional: `baseUrl` if you [self-host](/docs/self-host) Reloop. --- ## 4. Method A — Server Action (forms & app UI) ### When to use this - Contact form, welcome email after signup, magic link, password reset - Call site is a React Server Component or Client Component in **this** app - You want progressive enhancement with `
` and no hand-written `fetch` ### Action ```typescript // app/actions/send-welcome-email.ts "use server"; | { ok: true; messageId?: string } | { ok: false; error: string }; email: string, name?: string, ): Promise { const to = email.trim().toLowerCase(); if (!to || !to.includes("@")) { return { ok: false, error: "Enter a valid email address." }; } try { const { response, emailError } = await reloop.mail.send({ from: "Acme ", to, subject: name ? `Welcome, ${name}` : "Welcome to Acme", html: `

Thanks for signing up${name ? `, ${name}` : ""}.

You're ready to go.

`, text: `Thanks for signing up${name ? `, ${name}` : ""}. You're ready to go.`, reply_to: "support@yourdomain.com", tags: [{ name: "type", value: "welcome" }], }); if (emailError) { console.error("Reloop send failed", emailError); return { ok: false, error: "Could not send email. Try again." }; } return { ok: true, messageId: response?.messageId }; } catch (err) { console.error("Reloop send threw", err); return { ok: false, error: "Could not send email. Try again." }; } } ``` Notes: - `"use server"` must be at the top of the file (or above the exported function). - Return a **safe** result to the client. Log Reloop details server-side; do not dump API errors into the UI. - `from` must use a domain you verified in Reloop. ### Client form that calls the action ```tsx // app/signup/welcome-form.tsx "use client"; const [message, setMessage] = useState(null); const [pending, startTransition] = useTransition(); return ( { e.preventDefault(); const form = e.currentTarget; const data = new FormData(form); const email = String(data.get("email") ?? ""); const name = String(data.get("name") ?? ""); startTransition(async () => { const result = await sendWelcomeEmail(email, name || undefined); setMessage( result.ok ? "Check your inbox for a welcome email." : result.error, ); if (result.ok) form.reset(); }); }} > {message ?

{message}

: null} ); } ``` ### Form Action without client JS (optional) You can also bind the action directly: ```tsx // app/contact/page.tsx async function contactAction(formData: FormData) { "use server"; const email = String(formData.get("email") ?? ""); await sendWelcomeEmail(email); } return (
); } ``` Server Actions work for same-origin app flows. For external HTTP callers, use a Route Handler. --- ## 5. Method B — Route Handler (API route) ### When to use this - Stripe / Clerk / Supabase webhooks that should fire an email - Mobile apps, desktop clients, or another backend posting JSON - Cron jobs, n8n, Zapier, or AI agents that call HTTP - You need a stable URL like `POST /api/send-email` ### Route Handler ```typescript // app/api/send-email/route.ts type Body = { to?: string; subject?: string; html?: string; text?: string; name?: string; }; let body: Body; try { body = (await request.json()) as Body; } catch { return NextResponse.json({ error: "Invalid JSON body" }, { status: 400 }); } const to = body.to?.trim().toLowerCase(); if (!to || !to.includes("@")) { return NextResponse.json( { error: "Field `to` must be a valid email" }, { status: 400 }, ); } const subject = body.subject?.trim() || "Hello from Next.js"; const html = body.html?.trim() || `

Hi${body.name ? ` ${body.name}` : ""},

This was sent from a Next.js Route Handler.

`; const text = body.text?.trim() || `Hi${body.name ? ` ${body.name}` : ""}, This was sent from a Next.js Route Handler.`; try { const { response, emailError } = await reloop.mail.send({ from: "Acme ", to, subject, html, text, reply_to: "support@yourdomain.com", tags: [{ name: "source", value: "api-route" }], }); if (emailError) { console.error("Reloop send failed", emailError); return NextResponse.json( { error: "Failed to send email" }, { status: 502 }, ); } return NextResponse.json({ ok: true, id: response?.id, messageId: response?.messageId, }); } catch (err) { console.error("Reloop send threw", err); return NextResponse.json( { error: "Failed to send email" }, { status: 500 }, ); } } ``` ### Call it from the browser or another service ```typescript // From a Client Component or any HTTP client const res = await fetch("/api/send-email", { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ to: "user@example.com", name: "Ada", subject: "Your receipt", html: "

Thanks for your purchase.

", text: "Thanks for your purchase.", }), }); const data = await res.json(); if (!res.ok) throw new Error(data.error ?? "Send failed"); ``` cURL for local testing: ```bash curl -X POST http://localhost:3000/api/send-email \ -H "Content-Type: application/json" \ -d '{"to":"you@example.com","name":"Ada","subject":"Test from Next.js"}' ``` ### Protect the route An open send endpoint is an open relay. At minimum: 1. Require a session / auth check for user-triggered sends 2. Or require a shared secret header for webhooks and cron 3. Rate-limit by IP or user id Example secret gate for internal callers: ```typescript // inside POST, before sending const secret = request.headers.get("x-internal-secret"); if (secret !== process.env.INTERNAL_SEND_SECRET) { return NextResponse.json({ error: "Unauthorized" }, { status: 401 }); } ``` Add `INTERNAL_SEND_SECRET` to `.env.local` and Vercel the same way as the API key. --- ## 6. Server Action vs Route Handler — pick one | Question | Prefer Server Action | Prefer Route Handler | |----------|----------------------|----------------------| | Triggered by a form in this Next app? | Yes | — | | Need a public HTTP URL for webhooks / mobile / cron? | — | Yes | | Want zero client `fetch` boilerplate? | Yes | — | | Called from non-Next code? | — | Yes | | Same Reloop SDK? | Yes | Yes | | Safe for `RELOOP_API_KEY`? | Yes (server) | Yes (server) | You can use **both** in one app: Server Actions for product UI, Route Handlers for integrations. --- ## 7. Full `mail.send` fields you will use most ```typescript const { response, emailError } = await reloop.mail.send({ from: "Acme ", // required — verified domain to: "user@example.com", // string or string[] subject: "Order confirmed", // required html: "

Your order shipped.

", // HTML body text: "Your order shipped.", // plain-text fallback reply_to: "support@yourdomain.com", cc: "ops@yourdomain.com", bcc: "archive@yourdomain.com", tags: [{ name: "type", value: "receipt" }], }); ``` More options (attachments, templates, scheduling, headers) are on the [send email API reference](/docs/api/mail/post-api-mail-v1send). Always send both `html` and `text` when you can — better deliverability and clients that block HTML still get a readable message. See [transactional email best practices](/blog/transactional-email-best-practices). --- ## 8. Runtime: Node vs Edge - Prefer the default **Node.js** runtime for the Reloop SDK. - Edge Runtime is a restricted environment. If you must run on Edge, call Reloop’s **HTTP API** with `fetch` instead of relying on Node-only modules — same idea as the [Cloudflare Workers guide](/blog/send-email-cloudflare-workers). ```typescript // Edge-friendly alternative (no SDK) const body = await request.json(); const res = await fetch("https://reloop.sh/api/mail/v1/send", { method: "POST", headers: { "Content-Type": "application/json", "x-api-key": process.env.RELOOP_API_KEY!, }, body: JSON.stringify({ from: "Acme ", to: body.to, subject: body.subject, html: body.html, text: body.text, }), }); const data = await res.json(); return Response.json(data, { status: res.status }); } ``` For most App Router apps on Vercel, stick with the SDK on Node. --- ## 9. Deploy on Vercel 1. Push the app and import it in [Vercel](https://vercel.com) 2. Add env vars: `RELOOP_API_KEY` (and `INTERNAL_SEND_SECRET` if you use it) 3. Redeploy so server functions pick up the vars 4. Send a test from production; confirm delivery in the [Reloop logs](https://app.reloop.sh) Details: [Vercel + Reloop](/docs/integrations/vercel). --- ## 10. Common mistakes 1. **`NEXT_PUBLIC_RELOOP_API_KEY`** — exposes the key. Use server-only `RELOOP_API_KEY`. 2. **Calling Reloop from a Client Component** — keys and secrets belong in Server Actions / Route Handlers only. 3. **Unverified `from` domain** — verify DNS first ([domain guide](/docs/guides/connect-domain)). 4. **Open `/api/send-email`** — always authenticate or use a shared secret. 5. **Wrong constructor** — use `new Reloop({ apiKey })`, not a bare string, for the current SDK. 6. **Ignoring `emailError`** — check it (or catch throws) and return a safe user message. 7. **HTML only** — include `text` as a fallback. --- ## 11. FAQ Not directly. Client Components can **call** a Server Action or `fetch` your Route Handler. The Reloop SDK and API key stay on the server. Server Action. Less plumbing, works with `
`, and stays same-origin by default. In the server-side callback or server action that creates the user, call `sendWelcomeEmail(user.email)`. Do not wait for the client to “remember” to hit an API. Yes. Render your React Email template to HTML on the server, then pass the string as `html` to `reloop.mail.send`. In the Reloop dashboard logs, and via [webhooks](/docs/webhooks) for delivered, bounced, opened, and clicked events. --- ## 12. Copy-paste checklist - [ ] `npm install reloop-email` - [ ] `.env.local` → `RELOOP_API_KEY=rl_…` (no `NEXT_PUBLIC_`) - [ ] `lib/reloop.ts` shared client - [ ] **UI path:** `app/actions/send-welcome-email.ts` + form - [ ] **HTTP path:** `app/api/send-email/route.ts` + auth/secret - [ ] Verified sending domain on `from` - [ ] Vercel env vars set and redeployed - [ ] Test send + check logs --- ## Next steps - [Transactional email best practices](/blog/transactional-email-best-practices) — templates, timing, deliverability - [Next.js example in docs](/docs/examples/nodejs/nextjs) — short SDK reference - [Send mail API](/docs/api/mail/post-api-mail-v1send) — full payload - [Vercel AI SDK + Reloop](/blog/vercel-ai-sdk-reloop-notifications) — tool-calling notifications - Sibling guides: [SvelteKit](/blog/send-email-sveltekit) · [Remix](/blog/send-email-remix) · [Cloudflare Workers](/blog/send-email-cloudflare-workers) --- # Introducing Reloop: Open-Source Email Infrastructure Developers Actually Want to Use Path: /blog/introducing-reloop URL: https://reloop.sh/blog/introducing-reloop Markdown: https://reloop.sh/blog/introducing-reloop.md Open-source email infrastructure for indie hackers, startups, product teams, and enterprises. Ship transactional mail, agent inboxes, and inbound on Reloop Cloud or self-host—same product, no lock-in. Here's the one thing every developer and every company cares about with email infrastructure: **Will the mail land, and will we still own the stack when it does?** Pretty dashboards, fancy editors, and feature checklists are secondary. Password resets, receipts, and agent replies only matter if they reach the inbox, stay affordable as you grow, and don't trap you in a vendor you can't leave. Today we're introducing Reloop: [open-source email infrastructure](https://github.com/reloop-labs/reloop) built around the five things people actually evaluate when they pick (or regret picking) an email provider. Prefer a side-by-side? Start with [Compare Reloop](/compare) or our [2026 provider comparison](/blog/email-provider-comparison-2026). ## The five things that matter ### 1. Deliverability If mail lands in spam, nothing else counts. Reloop is built as real [delivery infrastructure](/features/deliverability): [SMTP](/features/smtp), [DKIM/SPF-oriented setup](/blog/spf-dkim-dmarc-setup-guide), bounce classification, and the operational pieces that keep reputation from becoming someone else's mystery. Use Reloop Cloud when you want managed reputation and IP pools. [Self-host](/docs/self-host) when you want the sending path on your own terms—see [self-hosted email infrastructure](/blog/self-hosted-email-infrastructure) for when that tradeoff is worth it. ### 2. Developer experience You should ship a [transactional email](/features/transaction-emails) in minutes, not a sprint. Reloop has a clean REST API (familiar if you've used modern email APIs), [SDKs for every major language](/languages), and [SMTP drop-in](/features/smtp) for Nodemailer, Laravel, Django, and the rest. Prefer the product tour for builders? See [Developers](/developers). Local and production should feel like the same product. [Docs](/docs) should help you ship, not send you hunting. ### 3. Cost that doesn't punish growth Email SaaS pricing often feels cheap at low volume and painful once you scale. Don't take that on faith—check the numbers yourself: - [Reloop pricing](/pricing) for hosted plans and what you get at each tier - [Compare Reloop vs Resend](/compare/resend), [vs SendGrid](/compare/sendgrid), [vs Mailgun](/compare/mailgun), and [vs AWS SES](/compare/aws-ses) - Full grid: [all provider comparisons](/compare) - Deeper write-up: [email provider comparison 2026](/blog/email-provider-comparison-2026) Reloop gives you two answers: a hosted path when you want zero ops, and a [full open-source path](/docs/self-host) when you want to run the stack yourself and stop renting your outbound channel forever—including a [low-cost self-host path](/blog/self-host-email-5-dollars) if you're optimizing ops spend. ### 4. Ownership (no vendor lock-in) This is the quiet deal-breaker. Proprietary APIs, opaque logs, and "you can't leave without a rewrite" are how email becomes a hostage situation. Reloop is [Apache 2.0](/license). The cloud product runs the same codebase you can `docker compose up` on Fly, Coolify, Kubernetes, or your own machines—see [Fly.io](/blog/reloop-flyio-deployment) and [Coolify](/blog/reloop-coolify-setup) guides, or the [self-host docs](/docs/self-host). Audit it. Fork it. Move it. Your data and compliance boundary stay yours. More on the bet: [why we open-sourced email infrastructure](/blog/why-we-open-sourced-email-infrastructure) and [why open source](/philosophy/why-open-source). ### 5. Visibility and the full loop "Did it send?" is not enough. You need deliveries, opens, clicks, bounces, and complaints as signed [webhooks](/features/webhooks) your app can act on: retries, suppressions, support alerts—plus [email analytics](/features/email-analytics) when you need the operational view. And for modern products (especially AI agents), send-only is half a system. Reloop includes inbound parsing, [agent inboxes](/features/ai-agents), and MCP support so agents can send, receive, and inspect mail with structured tools instead of scraping a random mailbox. See [email infrastructure for AI agents](/blog/email-infrastructure-for-ai-agents) and the [AI agent inbox use case](/use-cases/ai-agent-inbox). ## Why we open-sourced it Linux, Postgres, Redis, Nginx: the boring foundations of the internet are open. Email sits in that category. If it fails, users can't log in, can't reset passwords, and can't get receipts. Open source is how we make the five things above credible. You can read how delivery works. You can leave without rewriting your notification stack. The roadmap gets shaped by people shipping real mail, not only by a [pricing page](/pricing). Full rationale: [why we open-sourced email infrastructure](/blog/why-we-open-sourced-email-infrastructure) and [what we stand for](/philosophy/what-we-stand-for). We're not open-sourcing a demo. Reloop Cloud and Reloop open source are the same product—same APIs whether you use [hosted](/pricing) or [self-host](/docs/self-host). ## Who should care Indie hackers, startups, side projects, product teams, and enterprises—if you're looking for your thing in email, Reloop is built for you. Maybe that's cheap transactional mail that doesn't become your most expensive utility ([pricing](/pricing)). Maybe it's multi-tenant delivery without standing up an MTA team. Maybe it's self-host or cloud with real ownership and no lock-in. Maybe you're migrating off [SendGrid](/compare/sendgrid), [Resend](/compare/resend), or [Mailgun](/compare/mailgun) and want parity without a science project ([SendGrid migration guide](/blog/migrating-from-sendgrid)). Or you're building AI agents that need inbound and outbound as [real infrastructure](/features/ai-agents). Whatever your scale or stack, if deliverability, DX, cost, ownership, and visibility are how you judge email tools, keep Reloop on your radar—and verify the claims on [compare](/compare), [pricing](/pricing), and the [docs](/docs). ## Get in - GitHub: [github.com/reloop-labs/reloop](https://github.com/reloop-labs/reloop) (star it, watch it, contribute) - Cloud: [reloop.sh/dashboard/signup](https://reloop.sh/dashboard/signup) (first email in a couple of minutes) - Docs: [Docs](/docs) · [Pricing](/pricing) · [Compare](/compare) · [Self-host](/docs/self-host) We're early, shipping in public, and still at the stage where your feedback bends the curve. If those five things are what you care about, this is the project to watch.