コード例 #1
0
	    public IActionResult Contact(ContactViewModal model)
		{
			if (ModelState.IsValid)
			{

				_mailService.SendMail(Startup.Configuration["AppSettings:SiteEmailAddress"], model.Email, $"sub from {model.Name}",
					model.Message);
				ModelState.Clear();
				ViewBag.Message = "Mail Sent Thanks";
			}
			return View();

		}
コード例 #2
0
		public IActionResult Contact()
		{
			var m = new ContactViewModal();
			return View(m);
		}