public ActionResult AddEnquiry(EnquiryFormEntry enquiryFormEntry) { if (ModelState.IsValid) { var enquiryForm = new EnquiryFormEntry(); enquiryForm.Name = HttpUtility.HtmlEncode(enquiryFormEntry.Name); enquiryForm.Email = enquiryFormEntry.Email; enquiryForm.Message = HttpUtility.HtmlEncode(enquiryFormEntry.Message); enquiryForm.PhoneNumber = enquiryFormEntry.PhoneNumber; db.EnquiryFormEntries.Add(enquiryForm); db.SaveChanges(); var userMailer = new UserMailer(); userMailer.VerifyEmail(enquiryForm).Send(); return(RedirectToAction("Index")); } return(View("Index")); }