public ActionResult QuickTestSend(CreativeVm model) { try { MailChimpProcessor.QucikTestSend(model); TempData["Success"] = "Qucik Test has been sent successfully!"; } catch (Exception ex) { TempData["Error"] = "There is error in saving data." + string.Join("<br/>", ex.Message); } return(RedirectToAction("Index", new { id = model.CampaignId })); }
public ActionResult TestSend(CreativeVm model) { try { string filePath = Path.Combine(UploadPath, (string)Session["TestSeedList"]); string filePathLive = Path.Combine(UploadPath, (string)Session["FinalSeedList"]); model.TestEmails = CreativeHelper.ReadEmails(filePath); model.LiveEmails = CreativeHelper.ReadEmails(filePathLive); BackgroundJob.Enqueue(() => MailChimpProcessor.TestSend(model)); TempData["Success"] = "Testing creatives has been started successfully!"; } catch (Exception ex) { TempData["Error"] = "There is error in saving data." + string.Join("<br/>", ex.Message); } return(RedirectToAction("Index", new { id = model.CampaignId })); }