Getting Started
Introduction
What emails-sdk is and which providers it supports.
emails-sdk is a TypeScript library for sending email. You write your sending code once, and pick the provider that delivers it.
import { createClient } from '@nicogenz/emails-sdk';
import { resend } from '@nicogenz/emails-sdk/resend';
const email = createClient({
provider: resend({ apiKey: process.env.RESEND_API_KEY! }),
});
await email.send({
from: 'Acme <[email protected]>',
to: '[email protected]',
subject: 'Welcome to Acme',
html: '<p>Thanks for signing up!</p>',
});
Providers
| Provider | Import | Status |
|---|---|---|
| Local | @nicogenz/emails-sdk/local | Available |
| Resend | @nicogenz/emails-sdk/resend | Available |
| Postmark | @nicogenz/emails-sdk/postmark | Available |
| SendGrid | @nicogenz/emails-sdk/sendgrid | Available |
| Mailgun | @nicogenz/emails-sdk/mailgun | Available |
| Amazon SES | @nicogenz/emails-sdk/ses | Available |
| Cloudflare | @nicogenz/emails-sdk/cloudflare | Available |
Scope
emails-sdk only sends email. Managing templates, contacts or domains, and receiving webhooks, are out of scope for now.