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")); }
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")); }