Migrate from SMTP / Nodemailer to Notify

Leave SMTP and Nodemailer transport for a single HTTPS send call.

SMTP is fine plumbing. For app email, an HTTPS API is usually simpler to deploy (no open ports, no SMTP credential sprawl, easier observability). Nodemailer can speak SMTP or other transports — Notify replaces the transport with one POST.

What changes

SMTP / NodemailerNotify
Recommended clientnodemailer.createTransport + sendMailOne fetch — no mail library required
ProtocolSMTP (often 587/465)HTTPS JSON
AuthSMTP user/passx-api-key
Bodyhtml / text fieldsmessage
OpsRelays, IP reputation DIY, firewall rulesDomain verify + API key

Before / after

Nodemailer + SMTP

import nodemailer from 'nodemailer';

const transporter = nodemailer.createTransport({
  host: process.env.SMTP_HOST,
  port: 587,
  auth: {
    user: process.env.SMTP_USER,
    pass: process.env.SMTP_PASS
  }
});

await transporter.sendMail({
  from: 'noreply@acme.com',
  to: 'user@example.com',
  subject: 'Welcome',
  html: '<h1>Welcome</h1>'
});

Notify (one fetch — no SDK required)

await fetch('https://notify.cx/api/email/send', {
  method: 'POST',
  headers: {
    'x-api-key': process.env.NOTIFY_API_KEY!,
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    from: 'noreply@acme.com',
    to: 'user@example.com',
    subject: 'Welcome',
    message: '<h1>Welcome</h1>'
  })
});

Migration checklist

  1. Add NOTIFY_API_KEY and remove SMTP secrets from app config where possible
  2. Verify your domain in Notify
  3. Swap sendMail helpers for a small sendEmail() wrapper around Notify
  4. Use logs instead of scraping SMTP transcripts
  5. Add webhooks on Pro/Scale for bounces

Where to next?