One simple SDK for transactional email across 23 adapters
See the code
Email for TypeScript apps. One client for transactional email with your existing provider account. Pick the providers you actually send through, add retries and fallback routes, catch unsupported fields before they are silently dropped, and keep every send observable.
npm install @opencoredev/email-sdk
The SDK is server-side only and needs Node 20+ or Bun. Keep provider API keys out of client code.
import { createEmailClient } from "@opencoredev/email-sdk";
import { resend } from "@opencoredev/email-sdk/resend";
const email = createEmailClient({
adapters: [resend({ apiKey: process.env.RESEND_API_KEY! })],
});
await email.send({
from: "Acme <[email protected]>",
to: "[email protected]",
subject: "Welcome",
html: "<p>It works.</p>",
});
Resend, Postmark, SendGrid, AWS SES, Mailgun, Brevo, MailerSend, SparkPost, Mailchimp, Iterable, Loops, Plunk, Mailtrap, Cloudflare, Unosend, Scaleway, ZeptoMail, MailPace, Sequenzy, JetEmail, Lettermint, Lettr, Primitive, SendHeron, Helo, SMTP, and a testing adapter, each imported from its own entry point. New here? Start with resend for the fastest first send.
npx --package @opencoredev/email-sdk email-sdk doctor --adapter resend
Discover adapters, validate setup (doctor --live authenticates without sending), and run dry-run smoke sends from any environment.
Full docs live at email-sdk.dev/docs. Good places to start:
Email SDK collects anonymous usage analytics so we can see which adapters and CLI commands get used and how often sends succeed. The first run prints a notice with opt-out instructions.
What gets collected:
custom) and CLI command namesto + cc + bcc) and whether a message includes attachments (a boolean only, never the files themselves)Provider acceptance is not proof of delivery, and telemetry is best-effort, so these counts describe observed SDK usage, not every email sent. See telemetry for counting rules.
Everything is tied to a random anonymous ID stored in ~/.config/email-sdk/telemetry.json. Email content, subjects, addresses, headers, attachments, API keys, and any other message data are never collected.
Opt out at any time with an environment variable:
export EMAIL_SDK_TELEMETRY=0 # or DO_NOT_TRACK=1
or per client in code:
const client = createEmailClient({ adapters: [resend({ apiKey })], telemetry: false });
Telemetry is also disabled automatically when NODE_ENV=test.
Email SDK is supported by companies that help keep provider integrations practical and maintained. Want your logo here? Become a sponsor →
MIT License · Built by @leodev
4,599 followers · starred Sep 2026
1,389 followers · starred Sep 2026
2,531 followers · starred Jun 2026
252 followers · starred Jun 2026
One simple SDK for transactional email across 23 adapters
See the code
Email for TypeScript apps. One client for transactional email with your existing provider account. Pick the providers you actually send through, add retries and fallback routes, catch unsupported fields before they are silently dropped, and keep every send observable.
npm install @opencoredev/email-sdk
The SDK is server-side only and needs Node 20+ or Bun. Keep provider API keys out of client code.
import { createEmailClient } from "@opencoredev/email-sdk";
import { resend } from "@opencoredev/email-sdk/resend";
const email = createEmailClient({
adapters: [resend({ apiKey: process.env.RESEND_API_KEY! })],
});
await email.send({
from: "Acme <[email protected]>",
to: "[email protected]",
subject: "Welcome",
html: "<p>It works.</p>",
});
Resend, Postmark, SendGrid, AWS SES, Mailgun, Brevo, MailerSend, SparkPost, Mailchimp, Iterable, Loops, Plunk, Mailtrap, Cloudflare, Unosend, Scaleway, ZeptoMail, MailPace, Sequenzy, JetEmail, Lettermint, Lettr, Primitive, SendHeron, Helo, SMTP, and a testing adapter, each imported from its own entry point. New here? Start with resend for the fastest first send.
npx --package @opencoredev/email-sdk email-sdk doctor --adapter resend
Discover adapters, validate setup (doctor --live authenticates without sending), and run dry-run smoke sends from any environment.
Full docs live at email-sdk.dev/docs. Good places to start:
Email SDK collects anonymous usage analytics so we can see which adapters and CLI commands get used and how often sends succeed. The first run prints a notice with opt-out instructions.
What gets collected:
custom) and CLI command namesto + cc + bcc) and whether a message includes attachments (a boolean only, never the files themselves)Provider acceptance is not proof of delivery, and telemetry is best-effort, so these counts describe observed SDK usage, not every email sent. See telemetry for counting rules.
Everything is tied to a random anonymous ID stored in ~/.config/email-sdk/telemetry.json. Email content, subjects, addresses, headers, attachments, API keys, and any other message data are never collected.
Opt out at any time with an environment variable:
export EMAIL_SDK_TELEMETRY=0 # or DO_NOT_TRACK=1
or per client in code:
const client = createEmailClient({ adapters: [resend({ apiKey })], telemetry: false });
Telemetry is also disabled automatically when NODE_ENV=test.
Email SDK is supported by companies that help keep provider integrations practical and maintained. Want your logo here? Become a sponsor →
MIT License · Built by @leodev
4,599 followers · starred Sep 2026
1,389 followers · starred Sep 2026
2,531 followers · starred Jun 2026
252 followers · starred Jun 2026