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

OptionTypeDefault or requirement
apiKeystringrequired
euRegionbooleanfalse
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" });

On this page