Adapters
SparkPost
Configure the SparkPost Transmissions API adapter.
SparkPost
email-sdk/sparkpostimport { createEmailClient } from "email-sdk";
import { sparkpost } from "email-sdk/sparkpost";
const email = createEmailClient({
adapters: [sparkpost({ apiKey: process.env.SPARKPOST_API_KEY! })],
});Options
| Option | Type | Required | Notes |
|---|---|---|---|
apiKey | string | Yes | SparkPost API key. |
baseUrl | string | No | Defaults to https://api.sparkpost.com/api/v1. |
sandbox | boolean | No | Enables SparkPost sandbox mode. |
fetch | typeof fetch | No | Useful for tests or custom runtimes. |
SparkPost does not expose normalized CC/BCC in this adapter. See field support.