Transports
SparkPost
Send email through the SparkPost transmissions API.
Send email through the SparkPost transmissions API.
The one rule
Create this transport under the matching sently channel sender.
Configuration
| Option | Type | Default or requirement |
|---|---|---|
apiKey | string | required |
euRegion | boolean | false |
import { createMailer } from "sently/mailer";
import { SparkPostTransport } from "sently/transports/sparkpost";
const sender = createMailer({ transport: new SparkPostTransport({ apiKey: process.env.SPARKPOST_API_KEY! }) });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.