public ActionResult Contact(ContactModel model) { var msg = string.Format("Comment From:{1}{0}Email:{2}{0}Website:{3}{0}Comment:{4}{0}", Environment.NewLine, model.Name, model.Email, model.Website, model.Comment); return View(); }
public ActionResult Contact(ContactModel model) { var msg = string.Format("Comment From: {1}{0}Email:{2}{0}Website: {3}{0}Comment{4}{0}", Environment.NewLine, model.Name, model.Email, model.Website, model.Comment); if (_mail.SendMail("*****@*****.**", "*****@*****.**", "Website Contact", msg)) { ViewBag.MailSent = true; } return View(); }