SendGrid Provider

The SendGrid provider sends emails through the SendGrid API using the official @sendgrid/mail package.

Installation

npm install @sendgrid/mail

Configuration

Mail.configure({
  default: 'sendgrid',
  from: { address: 'noreply@example.com', name: 'My App' },
  mailers: {
    sendgrid: {
      driver: 'sendgrid',
      apiKey: process.env.SENDGRID_API_KEY!,
    },
  },
});