# MailerSend (/docs/adapters/mailersend)



<ProviderBadge adapter="mailersend" />

```ts
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 [#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 <a href="/docs/adapters/field-support">field support</a> for supported message fields.
