Transports

Mailgun

Send email through the Mailgun Messages API.

Send email through the Mailgun Messages API.

The one rule

Create this transport under the matching sently channel sender.

Configuration

OptionTypeDefault or requirement
apiKeystringrequired
domainstringrequired
region`"us""eu"`
import { createMailer } from "sently/mailer";
import { MailgunTransport } from "sently/transports/mailgun";

const sender = createMailer({ transport: new MailgunTransport({ apiKey: process.env.MAILGUN_API_KEY!, domain: "mg.example.com" }) });
await sender.send({ from: "hello@example.com", to: "person@example.com", subject: "Hello", text: "Hi" });

On this page