Skip to content

Instantly share code, notes, and snippets.

@zubairov
Created May 24, 2020 21:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zubairov/d401d803943192e99025e02aa4145937 to your computer and use it in GitHub Desktop.
Save zubairov/d401d803943192e99025e02aa4145937 to your computer and use it in GitHub Desktop.
const sgMail = require('@sendgrid/mail');
sgMail.setApiKey("foo");
const msg = {
to: 'recipient@example.org',
from: 'info@mydoorbell.app',
templateId: ' d-f8ab926d6193460589895936d95461eb',
dynamic_template_data: {
subject: 'Testing Templates',
name: 'Some One',
city: 'Denver',
},
};
await sgMail.send(msg);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment