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 / Nodemailer | Notify |
| --- | --- | --- |
| Protocol | SMTP (often 587/465) | HTTPS JSON |
| Auth | SMTP user/pass | x-api-key |
| Body | html / text fields | message |
| Ops | Relays, IP reputation DIY, firewall rules | Domain verify + API key |
Before / after
Nodemailer + SMTP
await transporter.sendMail({
from: 'noreply@acme.com',
to: 'user@example.com',
subject: 'Welcome',
html: '<h1>Welcome</h1>'
});
Notify
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
- Add
NOTIFY_API_KEYand remove SMTP secrets from app config where possible - Verify your domain in Notify
- Swap
sendMailhelpers for a smallsendEmail()wrapper around Notify - Use logs instead of scraping SMTP transcripts
- Add webhooks on Pro/Scale for bounces