public IHttpActionResult Get(EmailNotification emailNotification) { FEmailNotification fe = new FEmailNotification(); fe.Send(CredentialId, emailNotification); return(Ok(emailNotification)); }
public ActionResult Create(EmailNotification notification, string Sender, string Password) { FEmailNotification fe = new FEmailNotification(); fe.Send(CredentialId, 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")); } }