Exemplo n.º 1
0
        public ActionResult SubscriptionTest()
        {
            var mailController = new MailController();

            var email = mailController.Subscription("Привет, мир!", CurrentUser.Email);

            email.Deliver();
            return(Content("OK"));
        }
Exemplo n.º 2
0
        public ActionResult SubscriptionShow()
        {
            var mailController = new MailController();
            var email          = mailController.Subscription("Привет, мир!", CurrentUser.Email);

            using (var reader = new StreamReader(email.Mail.AlternateViews[0].ContentStream))
            {
                var content = reader.ReadToEnd();
                return(Content(content));
            }
        }
Exemplo n.º 3
0
        public ActionResult SubscriptionTest()
        {
            var mailController = new MailController();

            var email = mailController.Subscription("Привет, мир!", CurrentUser.Email);
            email.Deliver();
            return Content("OK");
        }
Exemplo n.º 4
0
        public ActionResult SubscriptionShow()
        {
            var mailController = new MailController();
            var email = mailController.Subscription("Привет, мир!", CurrentUser.Email);

            using (var reader = new StreamReader(email.Mail.AlternateViews[0].ContentStream))
            {
                var content = reader.ReadToEnd();
                return Content(content);
            }
            return null;
        }