예제 #1
0
 public ActionResult ContactUs(ContactUs ContactUs)
 {
     var user = Session["Person"] as Person;
     string email = user != null ? user.Email : "*****@*****.**";
     _userMailer.ContactUs(ContactUs, email).Send();
     return Content(Boolean.TrueString);
 }
예제 #2
0
        public virtual MailMessage ContactUs(ContactUs ContactUs, string useremail)
        {
            var mailMessage = new MailMessage { Subject = "Loccum Contact" };

            mailMessage.To.Add(ContactUs.Email);
            //Admin Email
            mailMessage.CC.Add(useremail);
            //  mailMessage.Bcc.Add("*****@*****.**");

            ViewBag.Name = ContactUs.Name;
            ViewBag.Email = ContactUs.Email;
            ViewBag.Subject = ContactUs.Subject;
            ViewBag.Message = ContactUs.Message;
            PopulateBody(mailMessage, viewName: "ContactUs");

            return mailMessage;
        }