public ActionResult Create(StudentInquiryForm form, string permalink) { var tour = _tourService.FindByPermalink(permalink); _mailer.SendStudentInquiry(tour, form); TempData [ "Info" ] = "We've submitted your inquiry and will be in touch shortly."; return RedirectToRoute("tour-show", new { permalink }); }
public EmailResult StudentInquiryEmail(Tour tour, StudentInquiryForm form) { To.Add(_studentInquiryNotificationEmailAddress); // TODO: from address should be configurable somewhere From = "*****@*****.**"; Subject = string.Format("Student Inquiry for {0}", tour.Name); return Email("StudentInquiry", new StudentInquiry { Tour = tour, Form = form }); }
public ActionResult StudentInquiryForm(string permalink) { var studentenquiryform = new StudentInquiryForm() { TourPermalink = permalink }; return View(studentenquiryform); }
public void SendStudentInquiry(Tour tour, StudentInquiryForm form) { // TODO: Mails are sent synchronously // this probably still should be refactored to use a real bg process _controller.StudentInquiryEmail(tour, form).Deliver(); }