Providers
Postmark
Send email through Postmark.
import { createClient } from '@nicogenz/emails-sdk';
import { postmark } from '@nicogenz/emails-sdk/postmark';
const email = createClient({
provider: postmark({ serverToken: process.env.POSTMARK_SERVER_TOKEN! }),
});
Options
| Option | Type | Required | Description |
|---|---|---|---|
serverToken | string | Yes | Your Postmark server API token. |
messageStream | string | No | The message stream to send through. Postmark uses outbound if not set. |
fetch | typeof fetch | No | A custom fetch implementation. |
Notes
tagsare sent as PostmarkMetadata.idempotencyKeyisn't supported. Passing one throws anEmailErrorwith the codeunsupported.sendBatchuses Postmark's batch endpoint and splits batches larger than 500 emails.