Ejemplo n.º 1
0
        public async Task <ActionResult> SendTestMail(SendEMailViewModel model)
        {
            var message = await EMailTemplate("WelcomeEmail");

            message = message.Replace("@ViewBag.Name", CultureInfo.CurrentCulture.TextInfo.ToTitleCase(model.FirstName));

            AuthMessageSender sender = new AuthMessageSender(_hostingEnvironment);
            await sender.SendEmailAsync(model.Email, "Welcome!", message);

            return(View("ConfirmationEmailSent"));
        }
Ejemplo n.º 2
0
        public async Task <ActionResult> Troubleshooting(SendEMailViewModel model)
        {
            var message = await EMailTemplate("TroubleshootingEmail");

            message = message.Replace("@ViewBag.Name", CultureInfo.CurrentCulture.TextInfo.ToTitleCase(model.Name));
            message = message.Replace("@ViewBag.Email", CultureInfo.CurrentCulture.TextInfo.ToTitleCase(model.Email));
            message = message.Replace("@ViewBag.ProblemArea", CultureInfo.CurrentCulture.TextInfo.ToTitleCase(model.ProblemArea));
            message = message.Replace("@ViewBag.Description", CultureInfo.CurrentCulture.TextInfo.ToTitleCase(model.Description));
            string subj = model.SupportOption;

            await MessageServices.SendEmailAsync("*****@*****.**", subj, message);

            return(View("EmailSent"));
        }
Ejemplo n.º 3
0
        public async Task <ActionResult> FeedBack(SendEMailViewModel model)
        {
            var message = await EMailTemplate("FeedBackEmail");

            message = message.Replace("@ViewBag.Name", CultureInfo.CurrentCulture.TextInfo.ToTitleCase(model.Name));
            message = message.Replace("@ViewBag.Email", CultureInfo.CurrentCulture.TextInfo.ToTitleCase(model.Email));
            message = message.Replace("@ViewBag.Rating", CultureInfo.CurrentCulture.TextInfo.ToTitleCase(model.Rating));
            message = message.Replace("@ViewBag.Comments", CultureInfo.CurrentCulture.TextInfo.ToTitleCase(model.Comments));
            string subj = model.SupportOption;

            await MessageServices.SendEmailAsync("*****@*****.**", subj, message);

            return(View("EmailSent"));
        }