public ActionResult SendOrder(Order order) { var orderText = "<h3>You have a new order - {0}. </h3><br/><ul>Order Details <li>Number of Items : {1}</li><li>Name: {2}</li><li>Phone: {3}</li><li>Address: {4}</li></ul>"; var mailObject = new MailObject() { From = "*****@*****.**", Subject = "New Order", MessageText = "New order placed", MessageHtml = string.Format(orderText, DateTime.Now, order.NumberOfItems, order.CustomerName, order.CustomerPhoneNumber, order.CustomerAddress) }; var response = SendSimpleMessage(mailObject); return RedirectToAction("Order"); }
public ActionResult Order() { var order = new Order(); return View(order); }