Email sending
Introduction
There is an option for you to send emails to your users. For example, we have prepared a "reset password" flow to demonstrate this ability. Please refer the official SendGrid doc for more information.
Preconditions
- Log in to SendGrid.
- Create a sender identity (see https://app.sendgrid.com/guide).
- Create SENDGRID_API_KEY (see https://app.sendgrid.com/guide/integrate/langs/nodejs).
Getting started
note
For this example, assume the extracted files are in ‘/hybridplateProject’
Open '/hybridplateProject/server/.env' and add SENDGRID_API_KEY variable there.
Open ‘/hybridplateProject/server/controllers/user.js’ and update the ‘msg’ variable with your verified sender information (msg.from). You can also update your email subject and text here.
Restart the server to apply the changes.
For more extended changes (reports, stats, dynamic templates) please check SendGrid's documentation.