public async Task <NotifierResponseSM> SendForgotPasswordNotificationAsync(UserSM user, string callbackUrl)
        {
            if (user != null)
            {
                var message = new MessageSM
                {
                    From         = GetFrom(),
                    To           = user.Email,
                    GreetingName = GetGreetingName(user),
                    Subject      = "Reset Password",
                    MessageBody  = $"Please reset your password by clicking here: <a href='{callbackUrl}'>link</a>",
                };
                var response = await _notifierService.SendNotificationAsync(message);

                return(response);
            }

            return(null);
        }
        public async Task <NotifierResponseSM> SendConfirmationNotificationAsync(UserSM user, string callbackUrl)
        {
            if (user != null)
            {
                var message = new MessageSM
                {
                    From         = GetFrom(),
                    To           = user.Email,
                    GreetingName = GetGreetingName(user),
                    Subject      = "Confirm your email",
                    MessageBody  = $"Please confirm your account by clicking this link: <a href='{HtmlEncoder.Default.Encode(callbackUrl)}'>link</a>",
                };
                var response = await _notifierService.SendNotificationAsync(message);

                return(response);
            }

            return(null);
        }
예제 #3
0
 public async Task <NotifierResponseSM> SendNotificationAsync(MessageSM message)
 {
     return(new NotifierResponseSM {
         Success = true
     });
 }