# Email SDK (/docs)



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.

```ts
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 [#start-here]

<Cards>
  <Card title="Send your first email" href="/docs/getting-started/quickstart" description="Install the SDK, create a client, and send a message." />

  <Card title="Understand adapters" href="/docs/concepts/adapter-model" description="Learn how adapters and routing names work." />

  <Card title="Browse adapters" href="/docs/adapters" description="See all supported email services." />

  <Card title="Read the API reference" href="/docs/reference/client" description="Look up client options, messages, errors, and the CLI." />
</Cards>

## What is included [#what-is-included]

* `createEmailClient` for 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 [#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.
