Prompt
I'm building a Node app and need a simple transactional email SDK
Latest observation
Oct 4, 2026
OpenAI APIWeb search: off
If you want a simple transactional email SDK for Node.js, you’ve got a few solid options depending on whether you want to send emails directly or wrap an SMTP/ESP provider.
Good options
1. Nodemailer
Best if you want a lightweight, widely used Node email library.
- Works with SMTP, Gmail, SES, SendGrid SMTP, Mailgun SMTP, etc.
- Very flexible
- Simple to start
Install
npm install nodemailer
Example
import nodemailer from "nodemailer";
const transporter = nodemailer.createTransport({
host: "smtp.example.com",
port: 587,
secure: false,
auth: {
user: process.env.SMTP_USER,
pass: process.env.SMTP_PASS,
},
});
await transporter.sendMail({
from: '"Acme" <no-reply@acme.com>',
to: "user@example.com",
subject: "Welcome!",
text: "Thanks for signing up.",
html: "<p>Thanks for signing up.</p>",
});
2. Resend
Best if you want a modern transactional email API with a simple SDK.
- Very easy to use
- Clean API
- Good for app emails, password resets, notifications
Install
npm install resend
Example
import { Resend } from "resend";
const resend = new Resend(process.env.RESEND_API_KEY);
await resend.emails.send({
from: "Acme <no-reply@acme.com>",
to: "user@example.com",
subject: "Welcome!",
html: "<p>Thanks for signing up.</p>",
});
3. SendGrid
Good if you want a mature provider with lots of deliverability features.
Install
npm install @sendgrid/mail
Example
import sgMail from "@sendgrid/mail";
sgMail.setApiKey(process.env.SENDGRID_API_KEY);
await sgMail.send({
to: "user@example.com",
from: "no-reply@acme.com",
subject: "Welcome!",
html: "<p>Thanks for signing up.</p>",
});
My recommendation
If you want:
- simplest SDK → Resend
- maximum flexibility → Nodemailer
- enterprise-style email platform → SendGrid
If you want, I can also give you:
- a tiny transactional email wrapper for Node,
- a NestJS/Express service, or
- a comparison of SendGrid vs Resend vs Nodemailer.