Skip to content

Latest commit

 

History

History
14 lines (13 loc) · 333 Bytes

single-email-single-recipient.md

File metadata and controls

14 lines (13 loc) · 333 Bytes

Send a Single Email to a Single Recipient

const sgMail = require('@sendgrid/mail');
sgMail.setApiKey(process.env.SENDGRID_API_KEY);
const msg = {
  to: '[email protected]',
  from: '[email protected]',
  subject: 'Hello world',
  text: 'Hello plain world!',
  html: '<p>Hello HTML world!</p>',
};
sgMail.send(msg);