MailerSend
Configure the MailerSend Email API adapter.
import { createEmailClient } from "@opencoredev/email-sdk";
import { mailersend } from "@opencoredev/email-sdk/mailersend";
const email = createEmailClient({
adapters: [mailersend({ apiKey: process.env.MAILERSEND_API_KEY! })],
});
Options
| Option | Type | Required | Notes |
|---|---|---|---|
apiKey |
string |
Yes | MailerSend API token. |
baseUrl |
string |
No | Defaults to https://api.mailersend.com. |
fetch |
typeof fetch |
No | Useful for tests or custom runtimes. |
See field support for supported message fields.
MailerSend custom headers map to headers. MailerSend documents custom headers as available on Professional and Enterprise accounts, so lower-plan accounts may need to omit headers.