NextMail

Quickstart

Send your first transactional email through NextMail in under ten minutes. Steps below assume you've created a tenant — sign up at /portal if you haven't.

1. Verify a sending domain

Add a subdomain (e.g. mail.yourbrand.com) so your root domain's mail reputation isn't affected by sends. Paste the three records NextMail generates into your DNS provider.

Records to add:

Verification runs every 30 seconds; usually completes in 1-5 minutes depending on DNS propagation.

2. Issue an API key

Head to API keys and click Create key. Give it a name (e.g. "Production") and a scope. The raw key is shown once; store it in your secret manager immediately.

bash
# .env
NEXTMAIL_KEY=nm_live_a1b2c3d4_REVEALED_ONCE_ONLY_e9f0a1b2c3d4

3. Send your first email

With curl, the REST API directly:

bash
curl https://api.nextmail.io/v1/emails \
  -H "Authorization: Bearer $NEXTMAIL_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "from": "noreply@mail.yourbrand.com",
    "to": "you@example.com",
    "subject": "Hello from NextMail",
    "html": "<p>It worked.</p>",
    "text": "It worked."
  }'

Or, with the official Node SDK:

send.ts
import { NextMail } from '@cybersquad/nextmail';

const mail = new NextMail({ apiKey: process.env.NEXTMAIL_KEY! });

await mail.send({
  from: 'noreply@mail.yourbrand.com',
  to: 'you@example.com',
  subject: 'Hello from NextMail',
  html: '<p>It worked.</p>',
});

4. Watch it land

Open the live logs tab in your portal — every send, every delivery event, every bounce shows up in real time. Open and click events follow within seconds of the recipient interacting.

Next steps