Open zatmonkey opened 1 year ago
Let's move to direct email send from the backend (not using the Firebase functions) I created a transactional template
const sgMail = require('@sendgrid/mail');
sgMail.setApiKey(process.env.SENDGRID_API_KEY);
const msg = {
to: 'recipient@example.org',
from: 'no-reply@diveboard.com',
templateId: 'f8501d9c-09c9-43c1-ab71-5ddad55cf6e0',
dynamicTemplateData: {
otp: '123456',
},
};
sgMail.send(msg);
Users who have reported Diveboard as SPAM are added to spam groups, which will cancel email delivery from sendgrid. While it's great to avoid spamming people, OTP email should always be sent.![image](https://user-images.githubusercontent.com/485530/235312050-0477ee1f-25d2-41f7-a01f-2e866fc04522.png)