示例#1
0
 public ActionResult Email(EmailMessage model)
 {
     return View(model);
 }
示例#2
0
        public ActionResult SendEmail(EmailMessage model)
        {
            if (ModelState.IsValid)
            {
                Helpers.SendEmail(db.Users.ToList(), model.Subject, model.Body);
                Session["hpmessage"] = "Your email has been sent";
                return Redirect("~/Admin");
            }
            else
                ModelState.AddModelError("", "Required fields are missing");

            return View("Email", model);
        }
示例#3
0
 public ActionResult Email()
 {
     EmailMessage email = new EmailMessage();
     return View(email);
 }