public ActionResult SendMail(MortgageEntryViewModel mortgageEntry, string email) { var success = false; if (ModelState.IsValid) { success = _mortgageService.SendEmail(mortgageEntry, email); } return(new CustomJson(new CustomJsonModel { Success = success, Message = success ? _emailSent : _errorMessage }, JsonRequestBehavior.DenyGet)); }