Ejemplo n.º 1
0
 public virtual MvcMailMessage NotifyFailedLoginAttemptMessage(EmailNotifyFailedLoginAttemptModel model)
 {
     ViewData.Model = model;
     return Populate(x =>
     {
         x.Subject = "Notification " + model.SiteName;
         x.ViewName = "NotifyFailedLoginAttempt";
         x.To.Add(model.ToEmail);
     });
 }
Ejemplo n.º 2
0
        public ActionResult SendNotifyFailedLoginEmail(string username)
        {
            Account account = AccountRepos.Get(username);
            EmailNotifyFailedLoginAttemptModel model = new EmailNotifyFailedLoginAttemptModel()
            {
                SiteName = siteName,
                SiteUrl = siteUrl,
                ToEmail = account.Email,
            };

            UserMailer mailer = new UserMailer();
            mailer.NotifyFailedLoginAttemptMessage(model).Send();
            return RedirectToAction("RequestChangePasswordSuccess", "Account");
        }