Esempio n. 1
0
 public IndividualMail CreateResetSecurePhraseNotification(ResetNotification notification)
 {
     return CreateResetNotification(notification, () => _mailConfiguration.ResetSecurePhraseNotificationTemplate);
 }
Esempio n. 2
0
 public IndividualMail CreateNewUserNotification(ResetNotification notification)
 {
     return CreateResetNotification(notification, () => _mailConfiguration.NewUserNotificationTemplate);
 }
Esempio n. 3
0
 public IndividualMail CreateResetPasswordNotification(ResetNotification notification)
 {
     return CreateResetNotification(notification, () => _mailConfiguration.ResetPasswordNotificationTemplate);
 }
Esempio n. 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,
     };
 }