Guest User

Untitled

a guest
Jun 19th, 2018
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. public class CreateSubscribeController : Controller
  2. {
  3. // GET: CreateSubscribe
  4. public ActionResult Index()
  5. {
  6. return View();
  7. }
  8.  
  9.  
  10. public ActionResult Create(string subscriberemail)
  11. {
  12.  
  13. var keys = new Dictionary<string, string>() {
  14. { "Email",subscriberemail }
  15. };
  16.  
  17. if (SitefinityWebApp.Helpers.SitefinityHelper.CreateSubscriberAndAddToMailingList(MailList.Maillist, subscriberemail))
  18. {
  19. SitefinityWebApp.Helpers.SitefinityHelper.SendEmailByTemplate(EmailTemplates.SubscribeEmail, subscriberemail, keys);
  20. return Json(new { val = true }, JsonRequestBehavior.AllowGet);
  21. }
  22. else
  23. {
  24. return Json(new { val = false }, JsonRequestBehavior.AllowGet);
  25. }
  26. }
  27. }
Add Comment
Please, Sign In to add comment