Transports

SendGrid

Send email through the SendGrid v3 API.

Send email through the SendGrid v3 API.

The one rule

Create this transport under the matching sently channel sender.

Configuration

OptionTypeDefault or requirement
apiKeystringrequired
import { createMailer } from "sently/mailer";
import { SendGridTransport } from "sently/transports/sendgrid";

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

On this page