Get started

Introduction

Choose a sender for the channel and a transport for the provider.

sently is the channel-delivery layer for email, SMS, WhatsApp, and push (Web Push or FCM). Choose a channel sender first, then attach a provider transport — so adding SMS or push later does not invent a new error and retry model in your app.

The one rule

Use createMailer, createSmsSender, createWhatsAppSender, or createPushSender in app code; swap transports when provider configuration changes.
bun add sently
import { createMailer } from "sently/mailer";
import { ResendTransport } from "sently/transports/resend";

const mailer = await createMailer({
  transport: new ResendTransport({
    apiKey: process.env.RESEND_API_KEY!,
  }),
});

await mailer.send({
  from: "hello@example.com",
  to: "person@example.com",
  subject: "Welcome",
  text: "Thanks for joining.",
});

Choose a channel

ChannelFactoryDelivery contract
EmailcreateMailer / createSMTPMailerTransport
SMScreateSmsSenderSmsTransport
WhatsAppcreateWhatsAppSenderWhatsAppTransport
PushcreatePushSenderPushTransport

Email factories are asynchronous. The other channel factories return their sender synchronously; all send operations are asynchronous.

Troubleshooting

Learn more

Next

On this page