Ejemplo n.º 1
0
        public ActionResult Send(QuoteQueryModel model)
        {
            if (string.IsNullOrEmpty(model.Person) ||
                string.IsNullOrEmpty(model.Tel) ||
                string.IsNullOrEmpty(model.Email) ||
                IsValidEmail(model.Email) == false ||
                string.IsNullOrEmpty(model.Person) ||
                string.IsNullOrEmpty(model.Query))
            {
                model.Error = "Please complete the mandatory details!";
                return(View("QuoteQuery", model));
            }

            model.Error = string.Empty;

            SendRequest(
                GemplasticsMail(model.Person, model.Tel, model.Email, model.Query, model.Width, model.Length, model.Microns, model.PlasticColor, model.Color1, model.Color2, model.Color3),
                ConfigurationManager.AppSettings["EmailTo"], model.Email, "Query from Website!");

            SendRequest(
                "Thank You for visiting Gemplastics! We will contact you shortly!" + @"<br /><br />" + "Gemplastics",
                model.Email, ConfigurationManager.AppSettings["EmailTo"], "E-mail from Gemplastic's website!");

            return(View("Sent"));
        }
Ejemplo n.º 2
0
        public ActionResult QuoteQuery()
        {
            var model = new QuoteQueryModel();

            return(View(model));
        }