示例#1
0
 private void threadSMTP_DoWork(object sender, DoWorkEventArgs e)
 {
     ArrayList list = (ArrayList)e.Argument;
     if (list == null || this.threadSMTP.CancellationPending || this.threadComManager.CancellationPending)
     {
         Console.WriteLine("CANCELLED  threadSMTP_DoWork");
         return;
     }
     ConnectionObject con = list.Count == 2 ? (ConnectionObject)list[0] : null;
     if (con == null)
     {
         return;
     }
     HostConfigObject hostSmtp = SettingsObject.ListSMTP[con.SmtpID];
     AddressObject destinationAddress = SettingsObject.ListAddress[con.AddressID];
     OpenPOP.MIMEParser.Message[] msgs = (OpenPOP.MIMEParser.Message[])list[1];
     if (msgs != null)
     {
         if (msgs.Length > 0)
         {
             ManagerSMTP manSmtp = new ManagerSMTP();
             manSmtp.running = true;
             manSmtp.Send(msgs, hostSmtp, destinationAddress);
         }
     }
     //this.threadSMTP.ReportProgress(100);
 }
示例#2
0
 private void button6_Click(object sender, EventArgs e)
 {
     ManagerSMTP man = new ManagerSMTP();
     man.testSmtp();
 }