Would you like to clone this notebook?

When you clone a notebook you are able to make changes without affecting the original notebook.

Cancel

Sendgrid Test

node v8.17.0
version: 2.0.0
endpointsharetweet
const sgMail = require('@sendgrid/mail'); sgMail.setApiKey(process.env.SENDGRID_API_KEY); sgMail.setSubstitutionWrappers('{{', '}}'); // Configure the substitution tag wrappers globally const msg = { to: 'eschoellhorn@352inc.com', from: process.env.SENDGRID_FROM_EMAIL, // subject: 'Hello world', // text: 'Hello plain world!', // html: '<p>Hello HTML world!</p>', templateId: process.env.SENDGRID_TEMPLATE_ID, substitutions: { PlanSponsorType: 'Golden Platinum Elite', InviteURL: 'http://352inc.com', }, }; sgMail .send(msg) .then(console.log) .catch(console.error);
Loading…

no comments

    sign in to comment