public async Task <string> SendNewUserInvitation([FromBody] SetPasswordMessage notification) { var msg = new SendGridMessage(); msg.AddSubstitution("-username-", notification.EventBody.Username); msg.AddSubstitution("-passwordtoken-", notification.EventBody.PasswordRenewalAccessToken); msg.AddSubstitution("-passwordverificationcode-", notification.EventBody.PasswordRenewalVerificationCode); return(await SendSendGrid(notification, msg)); }
public async Task <string> SendSetPassword([FromBody] SetPasswordMessage notification, [FromQuery] string configid) { var mergeVars = new List <GlobalMergeVar>() { new GlobalMergeVar { name = "username", content = notification.EventBody.Username }, new GlobalMergeVar { name = "passwordtoken", content = notification.EventBody.PasswordRenewalAccessToken }, new GlobalMergeVar { name = "passwordverificationcode", content = notification.EventBody.PasswordRenewalVerificationCode }, new GlobalMergeVar { name = "passwordrenewalurl", content = notification.EventBody.PasswordRenewalUrl } }; return(await _mandrillSend.SendAsync(configid, notification, mergeVars)); }
public async Task <MessageResource> SendForgottenPassword([FromBody] SetPasswordMessage notification) { return(await SendTwilio($"password reset code: {notification.EventBody.PasswordRenewalVerificationCode}", notification)); }
public async Task <MessageResource> SendNewUserInvitation([FromBody] SetPasswordMessage notification) { return(await SendTwilio($"verification code: {notification.EventBody.PasswordRenewalVerificationCode}", notification)); }