Email SDK - TypeScript email SDK for every provider
One email SDK for every provider.<br>Email SDK is a TypeScript email SDK for transactional sending through Resend, Postmark, SendGrid, Mailgun, AWS SES, Brevo, SMTP, and more with one clean API.<br>Read the docsBrowse adapters<br>Fallbacks<br>Retry failed sends and move to backup routes.
Adapters<br>Keep provider-specific code out of your app.
CLI<br>Run setup checks and test sends locally.
email.ts<br>Copy<br>1import { createEmailClient } from "@opencoredev/email-sdk";2import { resend } from "@opencoredev/email-sdk/resend";3import { smtp } from "@opencoredev/email-sdk/smtp";5const email = createEmailClient({6 adapters: [7 resend({ apiKey: process.env.RESEND_API_KEY! }),8 smtp({9 host: process.env.SMTP_HOST!,10 auth: {11 user: process.env.SMTP_USER!,12 pass: process.env.SMTP_PASS!,13 },14 }),15 ],16 fallback: ["smtp"],17 retry: { retries: 1 },18});20await email.send({21 from: "Acme ",22 to: "user@example.com",23 subject: "Welcome",24 text: "Your account is ready.",25});