13 lines
457 B
JavaScript
13 lines
457 B
JavaScript
|
|
// using Twilio SendGrid's v3 Node.js Library
|
|
// https://github.com/sendgrid/sendgrid-nodejs
|
|
const sgMail = require('@sendgrid/mail');
|
|
sgMail.setApiKey(process.env.SENDGRID_API_KEY);
|
|
const msg = {
|
|
to: 'wmantly@gmail.com',
|
|
from: 'info@no-reply.theta42.com',
|
|
subject: 'Sending with Twilio SendGrid is Fun',
|
|
text: 'and easy to do anywhere, even with Node.js',
|
|
html: '<strong>and easy to do anywhere, even with Node.js</strong>',
|
|
};
|
|
sgMail.send(msg); |