public ActionResult ContactUs(ContactViewModel model) { EmailSystem emailFollowUp = new EmailSystem(); emailFollowUp.EmailIt(emailFollowUp.RenderViewToString(this.ControllerContext, "_ContactForm", model), "*****@*****.**", System.Web.Configuration.WebConfigurationManager.AppSettings["ContactEmail"], "Contact Us", null); return(RedirectToAction("Index", "Home")); }
public ActionResult SubmitRenewal(int id) { string ip = Request.UserHostAddress; string userAgent = Request.UserAgent; RenewalViewModel model = new RenewalViewModel(); if (model.SubmitRenewal(id, BHIP.Model.Helper.Security.GetUserName(), ip, userAgent)) { EmailSystem objEmail = new EmailSystem(); if (WebConfigurationManager.AppSettings["EmailSystem"] == "Testing") { objEmail.EmailIt(objEmail.RenderViewToString(this.ControllerContext, "_Email", null), "*****@*****.**", "*****@*****.**", "*****@*****.**", BHIP.Model.ProjectGlobals.NextYear.ToString() + " Renewal Application - " + BHIP.Model.Helper.MemberInformation.GetMemberNameByRenewalID(id), null); } else { objEmail.EmailIt(objEmail.RenderViewToString(this.ControllerContext, "_Email", null), "*****@*****.**", BHIP.Model.Helper.MemberInformation.GetAuthorizeRepEmail(BHIP.Model.Helper.MemberInformation.GetMemberCoverageIDByRenewalID(id)) + "; " + BHIP.Model.Helper.MemberInformation.GetContactEmail(BHIP.Model.Helper.MemberInformation.GetMemberCoverageIDByRenewalID(id)), "*****@*****.**", BHIP.Model.ProjectGlobals.NextYear.ToString() + " Renewal Application - " + BHIP.Model.Helper.MemberInformation.GetMemberNameByRenewalID(id), null); } } return(Json(new { success = true })); }