public static bool SendNotificationToShop(Order order, Sender EmailSender) { string subject = $"New order {Convert.ToString(order.Date)}!"; string body = GetMessageForShop(order); string toAddress = "*****@*****.**"; try { EmailSender.SendMail(subject, body, toAddress); return true; } catch { return false; } }
public static bool SendNotificationToCustomer(Order order, Sender EmailSender) { string subject = "MasterShop — New order"; string body = GetMessageForCustomer(order); string toAddress = order.Customer.Email; try { EmailSender.SendMail(subject, body, toAddress); return true; } catch { return false; } }