Get started

Introduction

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

sently sends email, SMS, WhatsApp, and push (Web Push or FCM) without making provider SDK calls your application API. Choose the channel sender first, then attach the provider transport that performs delivery.

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