[Dnsmail-cvs] dnsmail/DnsMail DnsMail.cs,1.13,1.14
Brought to you by:
ethem
From: Ethem E. <et...@us...> - 2006-08-10 10:21:32
|
Update of /cvsroot/dnsmail/dnsmail/DnsMail In directory sc8-pr-cvs12.sourceforge.net:/tmp/cvs-serv28896/dnsmail/DnsMail Modified Files: DnsMail.cs Log Message: Removed global m_RcptCount . Index: DnsMail.cs =================================================================== RCS file: /cvsroot/dnsmail/dnsmail/DnsMail/DnsMail.cs,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** DnsMail.cs 7 Aug 2006 15:37:09 -0000 1.13 --- DnsMail.cs 10 Aug 2006 10:21:27 -0000 1.14 *************** *** 14,19 **** public class DnsMail : IDisposable, ISendableOneByOne { ! private SmtpClient m_Client; // SMTP Client ! private Int32 m_RcptCount; // Recipient OK Count #region Constants --- 14,18 ---- public class DnsMail : IDisposable, ISendableOneByOne { ! private SmtpClient m_Client; // SMTP Client #region Constants *************** *** 234,241 **** m_Client = null; } - if (disposing) - { - m_RcptCount ^= m_RcptCount; - } } } --- 233,236 ---- *************** *** 296,302 **** { initialize(); - addrecipients(); bool ignore; ! senddata(((Recipient)mi.Recipients[0]).ToString(), true, out ignore); } finally --- 291,297 ---- { initialize(); bool ignore; ! int rcptcount = addrecipients(); ! senddata(((Recipient)mi.Recipients[0]).ToString(), true, rcptcount, out ignore); } finally *************** *** 329,333 **** private void sendbatchsend(string originalBody) { - m_RcptCount = 1; string originalSubject = mi.Subject; bool readycontrol = false, senddatax = false, sendersent = true; --- 324,327 ---- *************** *** 376,380 **** mi.Subject = (ir.Subject == null) ? originalSubject : ir.Subject; ! senddata(rec.ToString(), false, out senddatax); if (senddatax) sendersent = false; --- 370,374 ---- mi.Subject = (ir.Subject == null) ? originalSubject : ir.Subject; ! senddata(rec.ToString(), false, 1, out senddatax); if (senddatax) sendersent = false; *************** *** 504,513 **** } ! private void addrecipients() { foreach (Recipient rec in mi.Recipients) { bool isok = m_Client.RcptTo(rec.Email); ! if (isok) ++m_RcptCount; rec.valid = isok; rec.code = m_Client.LastCode; --- 498,508 ---- } ! private int addrecipients() { + int rcptcount = 0; foreach (Recipient rec in mi.Recipients) { bool isok = m_Client.RcptTo(rec.Email); ! if (isok) ++rcptcount; rec.valid = isok; rec.code = m_Client.LastCode; *************** *** 515,523 **** } OnRecipientsAdded(mi.Recipients); ! if (m_RcptCount > 0) OnReadyToSendMassMail(EventArgs.Empty); } ! private void senddata(string __to, bool forcedclose, out bool datasentx) { datasentx = false; --- 510,519 ---- } OnRecipientsAdded(mi.Recipients); ! if (rcptcount > 0) OnReadyToSendMassMail(EventArgs.Empty); + return rcptcount; } ! private void senddata(string __to, bool forcedclose, int rcptcount, out bool datasentx) { datasentx = false; *************** *** 530,534 **** if (forcedclose) { ! if (m_RcptCount == 0) { if (mi.Recipients.Count == 1) --- 526,530 ---- if (forcedclose) { ! if (rcptcount == 0) { if (mi.Recipients.Count == 1) *************** *** 548,552 **** throw new MailServerException(m_Client.LastResponse); ! string header = mi.ToString(__to, m_RcptCount); sendbuffereddata(header); --- 544,548 ---- throw new MailServerException(m_Client.LastResponse); ! string header = mi.ToString(__to, rcptcount); sendbuffereddata(header); |