public ActionResult Index(FaleConoscoPortfolioVM model) { ViewBag.ContactSection = true; if (ModelState.IsValid) { _contactDomain.Send(model); this.AlertSuccess("", "Mensagem enviada com sucesso"); } return(View()); }
public void Send(FaleConoscoPortfolioVM vm) { var mail = new Email { Body = $@"E-mail: {vm.Email}<br /> Nome: {vm.Nome}<br /> Celular: {vm.Celular}<br /> {vm.Mensagem}", From = vm.Email, Subject = "[Clube dos Educadores] - Contato", To = ConfigurationManager.AppSettings["MailFrom"] }; _mailProvider.SendAsync(mail); }