This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const sendgridMail = require('@sendgrid/mail') | |
const ics = require('ics') | |
exports.sendMail = async ({ email, from, templateId, templateData = {}, asmData = {}, event = false }) => { | |
if (process.env.NODE_ENV !== 'production') { | |
console.info(`Skipping sending the email since is not production. Environment: ${process.env.NODE_ENV}`) | |
return Promise.resolve() | |
} | |
console.info('Sending email now') |