Email Fast Get a sandbox key
Guides

Send email with Node

One import, one client, one awaited call — a script or serverless function is all it takes.

Facts verified 2026-07-17 — corrections: hello@emailfast.dev

Plain Node.js needs no framework to send email — a script, a queue consumer, or a serverless function calls @email-fast/nodejs directly. One import, one client, one awaited call. This page is the minimal recipe; the full Node quickstart adds message timelines and webhooks.

npm install @email-fast/nodejs
// send.mjs — Node 18+
import { EmailFast } from "@email-fast/nodejs";

const ef = new EmailFast({ apiKey: process.env.EMAILFAST_API_KEY, baseUrl: "https://api.emailfast.dev" }); // ef_sandbox_… while testing

try {
  const { id, status } = await ef.send({
    to: "ada@example.com",
    subject: "Nightly report",
    html: "<p>{{rows}} rows processed.</p>",
    data: { rows: 4210 },
    idempotency_key: "report-2026-07-17", // re-running tonight's job can't double-send
  });
  console.log(`admitted ${id} (${status})`);
} catch (err) {
  console.error("send rejected:", err.message);
  process.exitCode = 1;
}
EMAILFAST_API_KEY=ef_sandbox_... node send.mjs

a 202 from the API means the send is committed to a durable, partitioned outbox before we answer — a crash can't lose it, and a retry with the same idempotency key can't double-send.

Gotchas

Next

See it for yourself

Sandbox keys run the real pipeline dry — real validation, real events, a hosted inbox, no email sent. Early access is onboarding now.