Skip to content

Instantly share code, notes, and snippets.

View ishandas387's full-sized avatar
๐Ÿ˜Ž

Ishan Das ishandas387

๐Ÿ˜Ž
View GitHub Profile
@codediodeio
codediodeio / index.js
Last active January 23, 2021 17:06
Transactional Email Firebase Cloud Function with Sendgrid
var functions = require('firebase-functions');
const sendgrid = require('sendgrid')
const client = sendgrid("YOUR_SG_API_KEY")
function parseBody(body) {
var helper = sendgrid.mail;
var fromEmail = new helper.Email(body.from);
var toEmail = new helper.Email(body.to);
var subject = body.subject;