Email SDK
Adapters

Mailtrap

Configure the Mailtrap Email Sending API adapter.

Mailtrap logo
Mailtrap
email-sdk/mailtrap
import { createEmailClient } from "email-sdk";
import { mailtrap } from "email-sdk/mailtrap";

const email = createEmailClient({
  adapters: [mailtrap({ apiKey: process.env.MAILTRAP_API_KEY! })],
});

Options

OptionTypeRequiredNotes
apiKeystringYesMailtrap API token.
baseUrlstringNoDefaults to https://send.api.mailtrap.io.
fetchtypeof fetchNoUseful for tests or custom runtimes.

See field support for supported message fields.

On this page