Sending an email notification dynamically to the end user
In the previous recipe, we hard-coded most of the attributes related to sending an email to an administrator as there was just one administrator. In this recipe, we will modify the previous recipe to send a Thank you for registration
email to the users themselves.
Getting ready
Make sure that the following steps are configured properly:
- The SendGrid account is created and an API key is generated in the SendGrid portal.
- An App settings configuration is created in the configuration of the function app.
- The App settings key is configured in the SendGrid output (message) bindings.
How to do it…
In this recipe, we will update the code in the run.csx
file of the following Azure functions:
RegisterUser
SendNotifications
Accepting the new email parameter in the RegisterUser function
Let's make changes to the RegisterUser
function to accept the email
parameter by performing...