Beispiel #1
0
        public void SendContactAgentMail(ContactAgentModel model)
        {
            var emails = _listingService.GetContactEmailsByListingId(model.ListingId);

            emails.Add(model.Email);
            var mailContent = EmailSender.GetRazorViewAsString(model, "~/Views/EmailTemplates/ContactAgent.cshtml");

            EmailSender.SendAgentContactEmail(emails, Resource.Contact_Agent_Mail_Title, mailContent);
        }
 public ActionResult SendMail(ContactAgentModel model)
 {
     _mailService.SendContactAgentMail(model);
     this.AddToastMessage(Resource.Success, Resource.General_Operation_Successfull, ToastType.Success);
     return(RedirectToAction("Index", "Property", new { id = model.ListingId }));
 }