checkedresponsive[@]gmail.com

Menu

How to send email thru SendGrid in NodeJS ?

Send Email thru Sendgrid in NodejS

  1. Install NodeJS
  2. npm update
  3. Install Sendgrid Package npm install --save @sendgrid/mail
const sgMail = require('@sendgrid/mail');
sgMail.setApiKey('<<SENDGRID API KEY>>');
const msg = {
to: <<TO@EMAIL.COM>>,
from: '<<FROM@EMAIL.COM>>',
subject: <<SUBJECT>>,
text: html,
html: <<HTML Content>>,
};
sgMail.send(msg);
Tags: ,

Leave a Reply

Your email address will not be published. Required fields are marked *