Example #1
0
        public ActionResult SendEmail(EmailModel email)
        {
            MailMessage emailSender = new MailMessage();
            emailSender.To.Add(email.To);
            emailSender.Subject = "New Message - PTS: " + email.Subject;
            emailSender.SubjectEncoding = System.Text.Encoding.UTF8;
            emailSender.From = new System.Net.Mail.MailAddress("[email protected]", "One Ghost", System.Text.Encoding.UTF8);
            emailSender.Body = "New Message From " + email.From + ".\n\n\n"
                + email.Body;
            emailSender.BodyEncoding = System.Text.Encoding.UTF8;

            //_emailService.SmtpSend(emailSender);
            return RedirectToAction("DisplaySessions", "Account");
        }
Example #2
0
        public ActionResult SendEmail(string email)
        {
            var user = _userService.GetById(SessionDataHelper.UserId);
            var model = new EmailModel {
                To = email,
                From = user.Email,
            };

            return View(model);
        }