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
| Option | Type | Default or requirement |
|---|---|---|
apiKey | string | required |
domain | string | required |
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" });No. Use the sently sender; provider-specific extras stay on the transport instance.