public ActionResult Contacts(HelpViewModel model)
        {
            if (ModelState.IsValid)
            {
                EmailSettings settings = new EmailSettings();
                SmtpClient smtp = new SmtpClient();
                smtp.Host = settings.ServerName;
                smtp.Port = settings.ServerPort;
                smtp.EnableSsl = settings.UseSsl;
                smtp.DeliveryMethod = SmtpDeliveryMethod.Network;
                smtp.UseDefaultCredentials = false;
                smtp.Credentials = new NetworkCredential(settings.MailFromAddress, settings.password);

                using (var msg = new MailMessage(settings.MailFromAddress, settings.MailFromAddress))
                {
                    string message = string.Format("От {0}<br>E-mail {1}<br>Сообщение {2}<br>",
                        model.FullName, model.Email, model.Text);
                    msg.Subject = "Вопрос-Ответ"; //message;
                    msg.IsBodyHtml = true;
                    msg.Body = message;
                    try
                    {
                        smtp.Send(msg);
                    }
                    catch (Exception)
                    {
                        return RedirectToAction("NotFound", "Error");
                    }
                }
                return View("HelpConfirm", "", model);
            }
            return View(model);
        }
 public ActionResult Contacts()
 {
     HelpViewModel model;
     if (User.Identity.IsAuthenticated)
     {
         var user = UserManager.FindByNameAsync(User.Identity.Name).Result;
         model = new HelpViewModel
         {
          //   FullName = user.LastName + " " + user.FirstName + " " + user.MiddleName,
             Email = user.Email,
             Text = ""
         };
     }
     else
     {
         model = new HelpViewModel();
     }
     return View(model);
 }