public async Task<ActionResult> Contact(ContactUsViewModel viewModel) { if (this.ModelState.IsValid) { await MailSender.Instance.SendMailAsync(viewModel.To, viewModel.Title, viewModel.Content); this.TempData[GlobalConstants.SuccessMessage] = "Успешно изпратихте имейл!"; return this.RedirectToAction("Contact", "Home", new { area = string.Empty }); } return this.View(viewModel); }
public ActionResult Contact() { var viewModel = new ContactUsViewModel(); return View(viewModel); }