Star 历史趋势
数据来源: GitHub API · 生成自 Stargazers.cn
README.md

Email SDK — Send email without provider lock-in

npm version GitHub stars Follow @leodev on X

One TypeScript client for transactional email. 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.

  • 🔌 Adapters for 20+ providers behind one normalized message
  • 🔁 Retries within an adapter, plus fallback routes across adapters
  • 🛟 Fail-fast field-support checks before a provider drops data
  • 🔭 Observability hooks for logs, metrics, and traces
  • 🧪 Test adapters that never call real providers
  • ⌨️ CLI for adapter discovery, doctor checks, and dry-run sends

Install

npm install @opencoredev/email-sdk

Server-side only (Node 20+ or Bun) — never expose provider API keys in client code.

Usage

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 <hello@acme.com>",
  to: "user@example.com",
  subject: "Welcome",
  html: "<p>It works.</p>",
});

Adapters

Resend, Postmark, SendGrid, Mailgun, Brevo, MailerSend, SparkPost, Mailchimp, Iterable, Loops, Plunk, Mailtrap, Cloudflare, Unosend, Scaleway, ZeptoMail, MailPace, Sequenzy, JetEmail, Primitive, SMTP, and a testing adapter — each imported from its own entry point. New here? Start with resend for the fastest first send.

CLI

npx email-sdk doctor --adapter resend

Discover adapters, validate setup, and run dry-run smoke sends from any environment.

Documentation

Full docs live at email-sdk.dev/docs. Good places to start:

Sponsors

Email SDK is supported by companies that help keep provider integrations practical and maintained. Want your logo here? Become a sponsor →

Email SDK sponsors

Sequenzy logo
Also sponsored by Sequenzy · adapter docs

Star History

Star history

AGPL-3.0 License · Built by @leodev

关于 About

Email SDK is a lightweight TypeScript library for sending email through Resend, Postmark, SendGrid, Mailgun, Brevo, SMTP, and more
bundeveloper-toolsemailemail-apiemail-sdknodemailerpostmarkresendsdksendgridtransactional-emailtypescript

语言 Languages

MDX77.2%
TypeScript21.6%
JavaScript0.9%
CSS0.2%
Ruby0.0%

提交活跃度 Commit Activity

代码提交热力图
过去 52 周的开发活跃度
90
Total Commits
峰值: 37次/周
Less
More

核心贡献者 Contributors