Sending an email notification to the end user dynamically
In the previous recipe, we hard coded most of the attributes related to sending an email to an administrator as there would be just one administrator. In this recipe, we will modify the previous recipe that sends emails to the user itself that sends a Thank you for registration email.
Getting ready
Make sure that the following are configured properly:
- The SendGrid account has been created and an API key is generated in the SendGrid portal
- An
App settingsis created in theApplication settingsof the function app - The
App settingskey is configured in theSendGrid output (message)bindings
How to do it...
- Navigate to the
RegisterUserfunction and make the following changes. - Add a new string variable that accepts new input parameter named
emailfrom therequestobject:
string firstname= inputJson.firstname;
string lastname=inputJson.lastname;
string profilePicUrl = inputJson.ProfilePicUrl;
string email = inputJson...