public void SendOrderShippedEmail(Models.Order order) { OrderShippedEmail email = new OrderShippedEmail(); email.To = order.Email; email.OrderId = order.OrderId; email.FullAddress = string.Format("{0} {1}, {2}, {3}", order.FirstName, order.LastName, order.Address, order.CodeAndCity); email.Send(); }
public void SendOrderShippedEmail(Models.Order order) { OrderShippedEmail email = new OrderShippedEmail(); email.To = order.Email; email.OrderId = order.OrderId; email.ResultsOfOrderGRList = order.ResultsOfOrderGRList; email.Send(); }
public void SendOrderShippedEmail(Models.Order order) { OrderShippedEmail email = new OrderShippedEmail(); email.To = order.Email; email.OrderId = order.OrderId; email.ResultsOfOrderGRList = order.ResultsOfOrderGRList; HostingEnvironment.QueueBackgroundWorkItem(ct => email.Send()); }
public ActionResult SendStatusEmail(int orderid, string lastname) { // This could also be used (but problems when hosted on Azure Websites) // if (Request.IsLocal) var orderToModify = db.Orders.Include("OrderItems").Include("OrderItems.Album").SingleOrDefault(o => o.OrderId == orderid && o.LastName == lastname); if (orderToModify == null) { return(new HttpStatusCodeResult(HttpStatusCode.NotFound)); } OrderShippedEmail email = new OrderShippedEmail(); email.To = orderToModify.Email; email.OrderId = orderToModify.OrderId; email.FullAddress = string.Format("{0} {1}, {2}, {3}", orderToModify.FirstName, orderToModify.LastName, orderToModify.Address, orderToModify.CodeAndCity); //email.Send(); return(new HttpStatusCodeResult(HttpStatusCode.OK)); }
public ActionResult SendStatusEmail(int orderid, string lastname) { // This could also be used (but problems when hosted on Azure Websites) // if (Request.IsLocal) var orderToModify = db.Orders.Include("ResultsOfOrderGRList").SingleOrDefault(o => o.OrderId == orderid && o.Email == lastname); if (orderToModify == null) { return(new HttpStatusCodeResult(HttpStatusCode.NotFound)); } OrderShippedEmail email = new OrderShippedEmail(); email.To = orderToModify.Email; email.OrderId = orderToModify.OrderId; email.ResultsOfOrderGRList = orderToModify.ResultsOfOrderGRList; email.Send(); return(new HttpStatusCodeResult(HttpStatusCode.OK)); }