I am using firebase cloud function for sendgrid email
const sgMail = require('@sendgrid/mail');
sgMail.setApiKey("");
export function sendEmail(to: any, subject: any, text: any, html: any) {
const msg = {
to: to,
from: 'example@email.com',
subject: subject,
text: text,
html: html,
};
(async () => {
try {
await sgMail.send(msg);
} catch (exceptions) {
console.error(exceptions);
return exceptions;
}
})();
}
ConversionConversion EmoticonEmoticon