Get started
Entrypoints
Use focused subpaths to import only the channel or integration you need.
sently exports focused subpaths so a channel can import its sender and a single provider transport.
The main sently package exports shared email factories and a few helpers — not every HTTP provider.
The one rule
Import a sender from its channel entrypoint and its provider from a sently/transports/*
entrypoint.
Quick start
Pick an email entrypoint
import { createMailer } from "sently/mailer";
import { SndrTransport } from "sently/transports/sndr";
const mailer = await createMailer({
transport: new SndrTransport({
apiKey: process.env.SNDR_API_KEY!,
}),
});Use SMTP only when you have relay configuration
import { createSMTPMailer } from "sently/smtp";
const mailer = await createSMTPMailer({
host: "smtp.example.com",
port: 587,
auth: { user: "you@example.com", pass: process.env.SMTP_PASS! },
});Channel entrypoints
| Import | Exports | Use |
|---|---|---|
sently | Shared factories, types, OAuth2, errors, toChannelSendResult, Fallback / WeightedFallback / Cloudflare Email | General email + shared helpers. |
sently/mailer | createMailer | Email with an explicit transport (smallest HTTP path). |
sently/smtp | createSMTPMailer | SMTP relay configuration. |
sently/sms | createSmsSender | SMS sender. |
sently/whatsapp | createWhatsAppSender | WhatsApp sender. |
sently/push | createPushSender | Push sender (Web Push or FCM). |
sently/channel-result | toChannelSendResult | Shared { messageId, provider, accepted } mapping. |
Supporting entrypoints
| Import | Use |
|---|---|
sently/transports/* | One provider or decorator transport (retry / fallback work across channels). |
sently/webhooks/<provider> | One webhook parser (email, SMS, or WhatsApp). |
sently/webhooks | Convenience barrel of all webhook helpers. |
sently/errors | Stable sently error classes and codes. |
sently/plugins/template | Template plugin and simple engine. |
sently/auth/oauth2 | SMTP OAuth2 client. |
sently/pool | SMTP connection pool. |
sently/dkim | DKIM signing entrypoint. |
sently/idempotency | Idempotency transport and memory store (email). |
Troubleshooting
No. createMailer requires a transport. Import createSMTPMailer from sently/smtp for relay configuration.
Import the concrete transport from its exported sently/transports/* subpath, such as sently/transports/sndr or sently/transports/resend.
HTTP providers were removed from the main barrel so bare Node/Deno imports do not load every client. Use the transport subpath.
Learn more
- Export reference — full entrypoint map
- All transports — providers by channel
- Bundle size — keep stacks small