Exemple #1
0
 public EmailResult CustomerMessageNotificationMail(MailModel model)
 {
     To.Add(model.Email);
     //To.Add("*****@*****.**");
     From = "*****@*****.**";
     Subject = "Mesajınız Bize Ulaştı";
     return Email("CustomerMessageNotification", model);
 }
Exemple #2
0
 public EmailResult MessageMail(MailModel model)
 {
     //To.Add(model.Email);
     //To.Add("*****@*****.**");
     To.Add("*****@*****.**");
     From = "*****@*****.**";
     Subject = model.Subject;
     return Email("MessageMail", model);
 }
Exemple #3
0
        public JsonResult SendMail()
        {
            try
            {

                //MailMessage mail = new MailMessage();

                //System.Net.NetworkCredential userInformation = new System.Net.NetworkCredential("*****@*****.**", "ss4b7858");
                //SmtpClient MailSend = new SmtpClient("mail.ichigocake.com", 587);
                //MailSend.EnableSsl = false;
                //MailSend.UseDefaultCredentials = true;
                //MailSend.Credentials = userInformation;

                ////Setting From , To and CC
                //mail.Subject = Request["subject"];

                //mail.Body = "Kullanıcı İsmi: " + Request["name"] + " Telefon Numarası: " + Request["phone"] + "Kullanıcı Email: " + Request["mail"] +
                //   " Mesajı: " +  Request["message"]  ;
                //mail.From = new MailAddress("*****@*****.**","ICHIGO CAKE");
                //mail.To.Add(new MailAddress("*****@*****.**"));
                //mail.Bcc.Add(new MailAddress("*****@*****.**"));
                //MailSend.Send(mail);

                var mailModel=new MailModel();
                mailModel.Email = Request["email"];
                mailModel.UserName = Request["name"];
                mailModel.Subject = Request["subject"];
                mailModel.Message = Request["message"];
                mailModel.Phone = Request["phone"];
                new MailController().MessageMail(mailModel).Deliver();
                new MailController().CustomerMessageNotificationMail(mailModel).Deliver();
                var message = "Mesajınız başarıyla iletilmiştir.";
                return Json(String.Format("'Success':'true', 'Başarı':'{0}'", message));

            }
            catch (Exception error)
            {
                var errormessage = "Bir Hata Oluştu. Daha sonra tekrar deneyiniz";
                return Json(String.Format("'Success':'false','Hata':'{0}'", error));
            }
        }