Пример #1
0
        /// <summary>
        /// 设置发件人信息
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnSet_Click(object sender, EventArgs e)
        {
            SenderForm sf = new SenderForm();

            if (sf.ShowDialog() == DialogResult.OK)
            {
                txtSender.Text  = sf.MailAdderss;
                btnSend.Enabled = !string.IsNullOrEmpty(txtNormal.Text.Trim()) &&
                                  !string.IsNullOrEmpty(txtSender.Text.Trim());
                if (btnSend.Enabled)
                {
                    _mailHelper = new MailHelper(sf.MailAdderss, sf.MailPW, sf.SMTPServer, sf.DisplayNmae, sf.IsSSL);
                }
            }
        }
Пример #2
0
 /// <summary>
 /// 设置发件人信息
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnSet_Click(object sender, EventArgs e)
 {
     SenderForm sf = new SenderForm();
     if (sf.ShowDialog() == DialogResult.OK)
     {
         txtSender.Text = sf.MailAdderss;
         btnSend.Enabled = !string.IsNullOrEmpty(txtNormal.Text.Trim()) &&
              !string.IsNullOrEmpty(txtSender.Text.Trim());
         if (btnSend.Enabled)
         {
             _mailHelper = new MailHelper(sf.MailAdderss, sf.MailPW, sf.SMTPServer, sf.DisplayNmae, sf.IsSSL);
         }
     }
 }