public ActionResult Create(EmailNotification notification) { _iFEmailNotification.Send(CredentialId, notification); return(View(notification)); //try //{ // if (ModelState.IsValid) // { // TempData["message"] = "Email has been sent, successfully!"; // } // return RedirectToAction("Create"); //} //catch (Exception ) //{ // if (ModelState.IsValid) // { // TempData["message"] = "Opps! Something went wrong. Please, try again."; // } // return RedirectToAction("Create"); //} }
public IHttpActionResult Get(EmailNotification emailNotification) { _iFEmailNotification.Send(CredentialId, emailNotification); return(Ok(emailNotification)); }
public ActionResult Create(EmailNotification notification) { _iFEmailNotification.Send(CredentialId, notification); return(View(notification)); }