Ejemplo n.º 1
0
        public async Task <ActionResult> SendMail(MailViewModel mail, List <string> To)
        {
            if (ModelState.IsValid)
            {
                success = await MailBusiness.SendMail(mail, To);

                if (success)
                {
                    ViewBag.Message = "File sent successfully";
                }
                else
                {
                    ViewBag.Message = "File not sent successfully";
                }
            }
            return(PartialView("Mails"));
        }
Ejemplo n.º 2
0
        public ActionResult SendMail(MailViewModel mail)
        {
            if (ModelState.IsValid)
            {
                result = MailBusiness.SendMail(mail);
                if (result)
                {
                    ViewBag.Message = "File sent successfully";
                }
                else
                {
                    ViewBag.Message = "File not sent successfully";
                }
            }

            return(PartialView("_Mail"));
        }