Transports

Mailtrap

Send email through Mailtrap delivery or sandbox mode.

Send email through Mailtrap delivery or sandbox mode.

The one rule

Create this transport under the matching sently channel sender.

Configuration

OptionTypeDefault or requirement
apiTokenstringrequired
sandboxbooleanfalse
inboxIdstringrequired when sandbox is true
import { createMailer } from "sently/mailer";
import { MailtrapTransport } from "sently/transports/mailtrap";

const sender = createMailer({ transport: new MailtrapTransport({ apiToken: process.env.MAILTRAP_API_TOKEN! }) });
await sender.send({ from: "hello@example.com", to: "person@example.com", subject: "Hello", text: "Hi" });

On this page