Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

sendgrid nodejs send email template

const sgMail = require('@sendgrid/mail');
sgMail.setApiKey(process.env.SENDGRID_API_KEY);
const msg = {
  to: 'recipient@example.org',
  from: 'sender@example.org',
  templateId: 'd-f43daeeaef504760851f727007e0b5d0',
  dynamic_template_data: {
    subject: 'Testing Templates',
    name: 'Some One',
    city: 'Denver',
  },
};
sgMail.send(msg);
Source by github.com #
 
PREVIOUS NEXT
Tagged: #sendgrid #nodejs #send #email #template
ADD COMMENT
Topic
Name
6+9 =