Email SDK
Get started

Install

Install the ESM-only SDK for Node.js 20+ or Bun 1.1+.

Install the package

npm install @opencoredev/email-sdk

The public package is @opencoredev/email-sdk. The unscoped email-sdk package is unrelated.

Confirm your runtime

Use Node.js 20+ or Bun 1.1+. The package is ESM-only, so use import syntax or dynamic import() from a CommonJS application.

package.json
{
  "type": "module"
}

Import one adapter

Adapters use separate package entry points, so your application imports only the integrations it uses.

email.ts
import { createEmailClient } from "@opencoredev/email-sdk";
import { resend } from "@opencoredev/email-sdk/resend";

Verify the CLI

A project install exposes the email-sdk binary. The built CLI uses a Node shebang and also runs under Bun.

npx email-sdk version
npx email-sdk adapters

For a global Homebrew install, use brew install opencoredev/tap/email-sdk after the formula points at a published release.

Quickstart

Create a client and send a validated message.

Provider credentials

Set the environment variables required by your adapter.

On this page