public IndividualMail CreateResetSecurePhraseNotification(ResetNotification notification)
 {
     return CreateResetNotification(notification, () => _mailConfiguration.ResetSecurePhraseNotificationTemplate);
 }
 public IndividualMail CreateNewUserNotification(ResetNotification notification)
 {
     return CreateResetNotification(notification, () => _mailConfiguration.NewUserNotificationTemplate);
 }
 public IndividualMail CreateResetPasswordNotification(ResetNotification notification)
 {
     return CreateResetNotification(notification, () => _mailConfiguration.ResetPasswordNotificationTemplate);
 }
 private IndividualMail CreateResetNotification(ResetNotification notification, Func<MailTemplate> getTemplate)
 {
     var template = getTemplate();
     return new IndividualMail
     {
         From = _mailConfiguration.SendMailNotificationsFrom,
         To = notification.UserEmail,
         Subject = template.Subject,
         Body = template.ApplyTemplate(notification.UserId, notification.UserEmail, notification.UserFirstName,
             notification.UserLastName, notification.ExpirationTime, notification.ResetToken,
             _mailConfiguration.BaseApplicationUrl),
         IsHtml = template.IsHtml,
     };
 }