示例#1
0
        private void btnSend_Click(object sender, RoutedEventArgs e)
        {
            EmailSendServiceClass EMSC = new EmailSendServiceClass(
                UserNameTextBox.Text,
                passwordBox.Password,
                tbTo.Text,
                tbHeaderMail.Text,
                tbTextMail.Text
                );

            EMSC.SendMail();
        }
 private void BtnSendMail_Click(object sender, RoutedEventArgs e)
 {
     EmailSendServiceClass.GetMailProperties(tbMailTopic.Text, tbMailText.Text, tbGetter.Text, tbLogin.Text,
                                             pbPassword.SecurePassword);
     try
     {
         EmailSendServiceClass.SendMail();
         SendEndWindow endWindow = new SendEndWindow("Письмо отправлено");
         endWindow.ShowDialog();
     }
     catch (Exception exc)
     {
         SendEndWindow endWindow = new SendEndWindow("Письмо не отправлено");
         endWindow.ShowDialog();
     }
 }