Email SDK
Send email through Resend, SMTP, Postmark, SendGrid, Mailgun, and more with one TypeScript API.
Email SDK is a small TypeScript package for sending transactional email through swappable adapters.
Use Resend for the default path, add SMTP when you want a cheap or self-managed route, and keep a second API adapter ready for fallback. Your app code still calls the same send method.
import { createEmailClient } from "email-sdk";
import { resend } from "email-sdk/resend";
const email = createEmailClient({
adapters: [resend({ apiKey: process.env.RESEND_API_KEY! })],
});
await email.send({
from: "Acme <hello@acme.com>",
to: "user@example.com",
subject: "Welcome",
text: "Your account is ready.",
});Start here
Send your first email
Install the SDK, create a client, and send a message.
Understand adapters
Learn how adapters and routing names work.
Browse adapters
See all supported email services.
Read the API reference
Look up client options, messages, errors, and the CLI.
What is included
createEmailClientfor one shared email client.email.send()for one message.email.sendBatch()for small batches where each result is reported separately.- Fifteen adapters, including Resend, SMTP, Postmark, SendGrid, Mailgun, and MailerSend.
- Retry, fallback, and hook options.
- A small CLI for adapter setup checks and test sends.
- A repo-local agent skill for future coding agents.
What stays small
Email SDK does not try to be a template engine, campaign tool, analytics platform, or full email operations suite. The first version is the layer most apps keep rebuilding: adapter setup, a consistent send call, typed errors, and a clean fallback path.