Mail

Email from your domain, sent with one call.

Add your domain, write a template with a live preview, and send it with one API call. Every email is signed as yours, so receiving servers know it came from you.

Send from your domain, not ours.

Add your domain, then set the DNS records Mail gives you, or send a setup link to whoever runs your DNS. Every email is then signed as yours.

Read the guide

Templates with a live preview, then one call to send.

Write the email once, with a placeholder for each detail, and watch the preview as you type. Your code sends it with one call and the details to fill in.

Read the guide

The live preview of a demo email after the edit: “Your autumn box is on its way, Ada.” Demo data.

Retries never send twice.

The SDK sends a key with every email and reuses it when it retries. However often your code tries, the email goes out once.

Read the guide

Broadcasts to the right people, with one-click unsubscribe.

Send one email to a segment or a topic, now or on a schedule. Every broadcast carries a one-click unsubscribe that the major mailboxes recognise, and people who leave are left out of the next send.

Read the guide

How it works

Your first email in three steps.

  1. Turn on Mail and add your domain in the console.
  2. Write a template and check it in the live preview.
  3. Send it from your server with @productcraft/mail.
server.ts
import { Mail } from "@productcraft/mail";

// Reads PRODUCTCRAFT_API_KEY from the environment. A workspace key
// finds its own workspace; pass { workspaceId } to skip that lookup.
const mail = new Mail();

const accepted = await mail.templates.send(
  "welcome",
  {
    from: "noreply@acme.com",
    to: "ada@example.com",
    data: {
      name: "Ada",
      product: "Acme",
      startUrl: "https://app.acme.com/onboarding",
    },
  },
  // The SDK generates an Idempotency-Key and reuses it on retries.
  // Pass your own to dedupe across processes: a replay returns the
  // original response with Idempotent-Replay: true for 24 h.
  { idempotencyKey: "welcome-2026-05-22-ada" },
);
console.log(accepted.id);

More in the box

Everything else Mail does.

For your AI agents

MCP tools for domains, templates, contacts and broadcasts, behind the policies you set on each key, so you decide whether an agent may only read or may also send. Read about MCP

Your first email, end to end.

Verify a domain, write a template and send it from Node. ProductCraft sends its own email through Mail.