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

ImportExportsUse
sentlyShared factories, types, OAuth2, errors, toChannelSendResult, Fallback / WeightedFallback / Cloudflare EmailGeneral email + shared helpers.
sently/mailercreateMailerEmail with an explicit transport (smallest HTTP path).
sently/smtpcreateSMTPMailerSMTP relay configuration.
sently/smscreateSmsSenderSMS sender.
sently/whatsappcreateWhatsAppSenderWhatsApp sender.
sently/pushcreatePushSenderPush sender (Web Push or FCM).
sently/channel-resulttoChannelSendResultShared { messageId, provider, accepted } mapping.

Supporting entrypoints

ImportUse
sently/transports/*One provider or decorator transport (retry / fallback work across channels).
sently/webhooks/<provider>One webhook parser (email, SMS, or WhatsApp).
sently/webhooksConvenience barrel of all webhook helpers.
sently/errorsStable sently error classes and codes.
sently/plugins/templateTemplate plugin and simple engine.
sently/auth/oauth2SMTP OAuth2 client.
sently/poolSMTP connection pool.
sently/dkimDKIM signing entrypoint.
sently/idempotencyIdempotency transport and memory store (email).

Troubleshooting

Learn more

Next

On this page