Beispiel #1
0
        //Notify customers about special
        private void NotifyCustomer(string message)
        {
            List <string> to = handlerSpecial.GetAllEmailAddresses();

            EmailNotification email = new EmailNotification(to, "Special At Photo Centre", message);

            email.SendMail();

            MessageBox.Show("Customers Notified.");
        }
Beispiel #2
0
        //Notify Customer via Email
        private bool EmailNotifyCustomer(int orderNumber, string emailAddress, string message)
        {
            bool sent = true;

            List <string> to = new List <string>();

            to.Add(emailAddress);

            EmailNotification email = new EmailNotification(to, "Order Collection", message);

            try
            {
                email.SendMail();
            }
            catch (Exception ex)
            {
                sent = false;
                MessageBox.Show("Error occured when sending Email!" + Environment.NewLine + Environment.NewLine +
                                ex.Message);
            }

            return(sent);
        }