Transports

Transports

Choose a provider transport for a channel sender.

Transports connect a sently channel sender to a delivery provider. Pick the transport that matches the channel you are sending on.

The one rule

Keep application delivery calls on a sently channel sender and replace only its transport when you change providers.
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.",
});

Exported transports

Every import below is an exported package subpath.

TransportChannelImport
SMTPEmailsently/transports/smtp
ResendEmailsently/transports/resend
SendGridEmailsently/transports/sendgrid
PostmarkEmailsently/transports/postmark
MailgunEmailsently/transports/mailgun
SESEmailsently/transports/ses
BrevoEmailsently/transports/brevo
MailerSendEmailsently/transports/mailersend
PlunkEmailsently/transports/plunk
SparkPostEmailsently/transports/sparkpost
MailtrapEmailsently/transports/mailtrap
LoopsEmailsently/transports/loops
Cloudflare EmailEmailsently/transports/cloudflare-email
SNDREmailsently/transports/sndr
Taqnyat MailEmailsently/transports/taqnyat-mail
Twilio SMSSMSsently/transports/twilio-sms
Taqnyat SMSSMSsently/transports/taqnyat-sms
MsegatSMSsently/transports/msegat
UnifonicSMSsently/transports/unifonic
WhatsApp CloudWhatsAppsently/transports/whatsapp-cloud
Taqnyat WhatsAppWhatsAppsently/transports/taqnyat-whatsapp
Web PushPushsently/transports/webpush
FCMPushsently/transports/fcm

For retry, fallback, preview, and idempotency wrappers, see Decorators.

Channel contracts

ChannelSenderTransport contract
EmailcreateMailer / createSMTPMailerTransport
SMScreateSmsSenderSmsTransport
WhatsAppcreateWhatsAppSenderWhatsAppTransport
PushcreatePushSenderPushTransport

Troubleshooting

Learn more

Next

On this page