Esempio n. 1
0
        private void BtnSendEmail_Click(object sender, RoutedEventArgs e)
        {
            // Список адресов для рассылки.
            List <string> listStrMails = Constants.listStrMails;

            string strPassword = passwordBox.Password;
            string senderEmail = Constants.SENDER_EMAIL;

            string subject = tbSubject.Text;
            string body    = tbBody.Text;

            foreach (string recieverEmail in listStrMails)
            {
                var mail = new EmailSendService();
                mail.Send(senderEmail, strPassword, recieverEmail, subject, body);
            }

            SendEndWindow sew = new SendEndWindow
            {
                Owner = this
            };

            sew.ShowDialog();
        }