Пример #1
0
 public IndividualMail CreateResetSecurePhraseNotification(ResetNotification notification)
 {
     return CreateResetNotification(notification, () => _mailConfiguration.ResetSecurePhraseNotificationTemplate);
 }
Пример #2
0
 public IndividualMail CreateNewUserNotification(ResetNotification notification)
 {
     return CreateResetNotification(notification, () => _mailConfiguration.NewUserNotificationTemplate);
 }
Пример #3
0
 public IndividualMail CreateResetPasswordNotification(ResetNotification notification)
 {
     return CreateResetNotification(notification, () => _mailConfiguration.ResetPasswordNotificationTemplate);
 }
Пример #4
0
 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,
     };
 }