예제 #1
0
        public ActionResult SendContactRequest(string name, string phoneNumber, string email, string message)
        {
            EmailSendingService _EmailSendingService = new EmailSendingService();

            string textBody = "<br>Name: " + name + "<br>" +
                              "Phone Number: " + phoneNumber + "<br>" +
                              "Email: " + email + "<br>" +
                              "Message: " + message;

            string emailBody = "<b>Samson Fund received an information request:</b><br>" +
                               "<br>Name: " + name + "<br>" +
                               "Phone Number: " + phoneNumber + "<br>" +
                               "Email: " + email + "<br>" +
                               "Message: " + message;

            try
            {
                _EmailSendingService.SendGmailEmail("*****@*****.**", "*****@*****.**", "Samson Fund Information Request", textBody, true);
                _EmailSendingService.SendGmailEmail("*****@*****.**", "*****@*****.**", "Samson Fund Request", emailBody, true);
            }
            catch (Exception ex)
            {
                return(Json(new { Success = "False", responseText = ex.InnerException.Message }, JsonRequestBehavior.AllowGet));
            }

            return(Json(new { Success = true }));
        }