public ActionResult RecoveryPassword(RecoveryPassvordViewModel model) { if (ModelState.IsValid) { CabinetUserDTO user = userService.GetDTO(model.Email); if (user == null) { ModelState.AddModelError("", Resource.Message_EmailNotRegitered); } else { queuePasswordRecovery.Push(new UserPasswordRecoveryAppEvent() { Email = model.Email, Password = user.Password, Cabinet = true }); /*Task task = new Task(() => sendEmail(model.Email, * String.Format(Resource.Text_RecoveryPasswordSubject, Resource.AppName), * user.Password)); * task.Start();*/ model.IsSend = true; } } return(View(model)); }
public ActionResult RecoveryPassword(RecoveryPassvordViewModel model) { if (ModelState.IsValid) { WorkerUserDTO user = userService.GetDTO(model.Email); if (user == null) { ModelState.AddModelError("", Resource.Message_EmailNotRegitered); } else { Task task = new Task(() => sendEmail(model.Email, String.Format(Resource.Text_RecoveryPasswordSubject, Resource.AppName), user.Password)); task.Start(); model.IsSend = true; } } return(View(model)); }