DPDK Architecture  ->  Bootstrap (v3.0.5)

Sendgrid
>= v1.17.0

The bootstrap includes a sendgrid module for sending mail but is disabled by default.

Config
>= v1.17.0

Below is the default application config for the sendgrid module:

{
  "sendgrid": {
    "enabled": false,
    "from": "",
    "key": ""
  }
}

Usage
>= v1.36.1

const bootstrap = new NextBootstrap(__dirname, process.cwd(), nextConfig);

// Returns a Promise with the sendgrid result
bootstrap.sendgrid.send({
  to: "user@dpdk.com",
  cc: "anotheruser@dpdk.com",
  bcc: "hiddenuser@dpdk.com",
  replyTo: "noreply@dpdk.com",
  subject: "Test",
  body: {
    text: "Test body",
    html: "Test body"
  },
  attachments: []
});

bootstrap.init();

Additional Sendgrid Connector Documentation: https://www.npmjs.com/package/@sendgrid/mail

Additional Sendgrid Documentation: https://sendgrid.com/docs/for-developers/sending-email/quickstart-nodejs/

Last modifiedFriday, April 30, 2021, 12:00:21 PM UTC
Last authorColin van Eenige
Commit ID4c7a701