Exemple #1
0
        public ActionResult SendConfirmation(string destination)
        {
            var model = new Models.ConfirmationEmailViewModel
            {
                ConfirmationLink = Request.Url.Scheme + "://" + Request.Url.Authority
                                   + Url.Action("FakeConfirmation", new { ConfirmationToken = Path.GetRandomFileName() + Path.GetRandomFileName() + Path.GetRandomFileName() + Path.GetRandomFileName() })
            };

            model.WebVersion = Request.Url.Scheme + "://" + Request.Url.Authority + Url.Action(EmailController.CONFIRMATION_EMAIL, "Email", model);
            EmailController.Send(HttpContext.Request.RequestContext, destination, "Confirmation Email Test", EmailController.CONFIRMATION_EMAIL, model);
            return(RedirectToAction("Ok", new { destination = destination, email = model.WebVersion }));
        }
Exemple #2
0
        public ActionResult SendNews(string destination, string title, string text)
        {
            var model = new Models.NewsEmailViewModel
            {
                Title        = title,
                Description  = text,
                ImageLink    = Request.Url.Scheme + "://" + @Request.Url.Authority + Url.Content("~/Images/ipsum.jpg"),
                ReadMoreLink = Request.Url.Scheme + "://" + @Request.Url.Authority + Url.Action("FakeNews")
            };

            model.WebVersion = Request.Url.Scheme + "://" + @Request.Url.Authority + Url.Action(EmailController.NEWS_EMAIL, "Email", model);
            EmailController.Send(HttpContext.Request.RequestContext, destination, "News Email Test", EmailController.NEWS_EMAIL, model);
            return(RedirectToAction("Ok", new { destination = destination, email = model.WebVersion }));
        }