Send email with SendGrid.
$ npm install sendgrid-email
const sendgrid = require('sendgrid-email');
(async function() {
sendgrid.configure({
apiKey: 'your-sendgrid-api-key'
});
let to = { email: 'jack@example.com', name: 'Jack Smith' };
let from = { email: 'jill@example.com', name: 'Jill Smith '};
let subject = 'Hello there!';
let text = 'Sent with sendgrid!';
await sendgrid.send({ to, from, subject, text });
})();
MIT license; see LICENSE.