dnsmail-cvs Mailing List for DnsMail
Brought to you by:
ethem
You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
(7) |
Apr
(1) |
May
(72) |
Jun
(22) |
Jul
(4) |
Aug
(52) |
Sep
|
Oct
|
Nov
|
Dec
(2) |
---|
From: Ethem E. <et...@us...> - 2006-12-07 13:14:01
|
Update of /cvsroot/dnsmail/dnsmail/DnsMail In directory sc8-pr-cvs12.sourceforge.net:/tmp/cvs-serv7793/dnsmail/DnsMail Modified Files: MailInfo.cs Log Message: Bumped to 0.6 (Dev) Index: MailInfo.cs =================================================================== RCS file: /cvsroot/dnsmail/dnsmail/DnsMail/MailInfo.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** MailInfo.cs 15 Aug 2006 13:29:19 -0000 1.3 --- MailInfo.cs 7 Dec 2006 13:13:56 -0000 1.4 *************** *** 189,193 **** } header.AppendFormat("Date: {0}" + "\r\n", __sd); ! header.Append("X-Mailer: Erle.DnsMail.v0.5.0.0" + "\r\n"); // Subject: --- 189,193 ---- } header.AppendFormat("Date: {0}" + "\r\n", __sd); ! header.Append("X-Mailer: Erle.DnsMail.v0.6.0.0" + "\r\n"); // Subject: |
From: Ethem E. <et...@us...> - 2006-12-07 13:14:01
|
Update of /cvsroot/dnsmail/dnsmail In directory sc8-pr-cvs12.sourceforge.net:/tmp/cvs-serv7793/dnsmail Modified Files: AssemblyInfo.cs Log Message: Bumped to 0.6 (Dev) Index: AssemblyInfo.cs =================================================================== RCS file: /cvsroot/dnsmail/dnsmail/AssemblyInfo.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** AssemblyInfo.cs 15 Aug 2006 13:29:19 -0000 1.5 --- AssemblyInfo.cs 7 Dec 2006 13:13:56 -0000 1.6 *************** *** 11,15 **** // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: ! [assembly: AssemblyVersion("0.5.0.0")] [assembly: AssemblyTitle("Erle.DnsMail")] --- 11,15 ---- // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: ! [assembly: AssemblyVersion("0.6.0.0")] [assembly: AssemblyTitle("Erle.DnsMail")] |
From: Ethem E. <et...@us...> - 2006-08-24 09:01:17
|
Update of /cvsroot/dnsmail/dnsmail/DnsMail In directory sc8-pr-cvs12.sourceforge.net:/tmp/cvs-serv7301/dnsmail/DnsMail Modified Files: DnsMail.cs Log Message: Some cleanup. Index: DnsMail.cs =================================================================== RCS file: /cvsroot/dnsmail/dnsmail/DnsMail/DnsMail.cs,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** DnsMail.cs 15 Aug 2006 13:07:00 -0000 1.17 --- DnsMail.cs 24 Aug 2006 09:01:09 -0000 1.18 *************** *** 334,340 **** { initialize(); - bool ignore; int rcptcount = addrecipients(); ! senddata(((Recipient)mi.Recipients[0]).ToString(), true, rcptcount, out ignore); } finally --- 334,339 ---- { initialize(); int rcptcount = addrecipients(); ! senddata(((Recipient)mi.Recipients[0]).ToString(), true, rcptcount); } finally *************** *** 368,372 **** { string originalSubject = mi.Subject; ! bool readycontrol = false, senddatax = false, sendersent = true; foreach (Recipient rec in mi.Recipients) { --- 367,371 ---- { string originalSubject = mi.Subject; ! bool readycontrol = false, sendersent = true; foreach (Recipient rec in mi.Recipients) { *************** *** 413,418 **** mi.Subject = (ir.Subject == null) ? originalSubject : ir.Subject; ! senddata(rec.ToString(), false, 1, out senddatax); ! if (senddatax) sendersent = false; --- 412,416 ---- mi.Subject = (ir.Subject == null) ? originalSubject : ir.Subject; ! if (senddata(rec.ToString(), false, 1)) sendersent = false; *************** *** 560,569 **** } ! private void senddata(string __to, bool forcedclose, int rcptcount, out bool datasentx) { - datasentx = false; mi.sent = false; if (!mi.SendMail) ! return; //noerr try --- 558,566 ---- } ! private bool senddata(string __to, bool forcedclose, int rcptcount) { mi.sent = false; if (!mi.SendMail) ! return false; //don't send data try *************** *** 595,599 **** throw new MailServerException(m_Client.LastResponse); - datasentx = true; mi.sent = true; datasent = true; --- 592,595 ---- *************** *** 601,604 **** --- 597,602 ---- if (forcedclose) OnSent(EventArgs.Empty); + + return true; } catch (Exception exc) |
From: Ethem E. <et...@us...> - 2006-08-24 09:01:13
|
Update of /cvsroot/dnsmail/dnsmail In directory sc8-pr-cvs12.sourceforge.net:/tmp/cvs-serv7301/dnsmail Modified Files: SmtpClient.cs Log Message: Some cleanup. Index: SmtpClient.cs =================================================================== RCS file: /cvsroot/dnsmail/dnsmail/SmtpClient.cs,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** SmtpClient.cs 18 Aug 2006 11:27:17 -0000 1.9 --- SmtpClient.cs 24 Aug 2006 09:01:09 -0000 1.10 *************** *** 59,75 **** LingerState = new LingerOption(true, 5); Connect(remote); ! if (Client.Poll(21000000, SelectMode.SelectRead)) ! { ! UseLog = useLog; ! dataStream = GetStream(); ! recvBuffer = new byte[256]; ! if (SendAndReceive(null) == Commands.Ok) ! { ! esmtp = (LastAnswer.ToLower().IndexOf("esmtp") != -1); ! return; ! } throw new MailServerException(LastResponse); ! } ! throw new MailServerException(String.Empty); } --- 59,74 ---- LingerState = new LingerOption(true, 5); Connect(remote); ! ! if (!Client.Poll(21000000, SelectMode.SelectRead)) ! throw new MailServerException(String.Empty); ! ! UseLog = useLog; ! dataStream = GetStream(); ! recvBuffer = new byte[256]; ! ! if (SendAndReceive(null) != Commands.Ok) throw new MailServerException(LastResponse); ! ! esmtp = (LastAnswer.ToLower().IndexOf("esmtp") != -1); } |
From: Ethem E. <et...@us...> - 2006-08-18 12:53:53
|
Update of /cvsroot/dnsmail/dnsmail In directory sc8-pr-cvs12.sourceforge.net:/tmp/cvs-serv30365/dnsmail Modified Files: Erle.DnsMail.csproj Log Message: Corrected OutputPath for Ssl configurations. Index: Erle.DnsMail.csproj =================================================================== RCS file: /cvsroot/dnsmail/dnsmail/Erle.DnsMail.csproj,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** Erle.DnsMail.csproj 18 Aug 2006 11:27:16 -0000 1.8 --- Erle.DnsMail.csproj 18 Aug 2006 12:53:49 -0000 1.9 *************** *** 77,81 **** NoWarn = "" Optimize = "false" ! OutputPath = "bin\Debug\" RegisterForComInterop = "false" RemoveIntegerChecks = "false" --- 77,81 ---- NoWarn = "" Optimize = "false" ! OutputPath = "bin\Debug-Ssl\" RegisterForComInterop = "false" RemoveIntegerChecks = "false" *************** *** 97,101 **** NoWarn = "" Optimize = "true" ! OutputPath = "bin\Release\" RegisterForComInterop = "false" RemoveIntegerChecks = "false" --- 97,101 ---- NoWarn = "" Optimize = "true" ! OutputPath = "bin\Release-Ssl\" RegisterForComInterop = "false" RemoveIntegerChecks = "false" |
From: Ethem E. <et...@us...> - 2006-08-18 11:27:21
|
Update of /cvsroot/dnsmail/dnsmail In directory sc8-pr-cvs12.sourceforge.net:/tmp/cvs-serv31461/dnsmail Modified Files: Erle.DnsMail.csproj Erle.DnsMail.csproj.user Erle.DnsMail.sln SmtpClient.cs UnsafeNativeMethods.cs Log Message: New Configurations: Debug-Ssl and Release-Ssl Don't build SSL support in default configurations. Index: Erle.DnsMail.csproj =================================================================== RCS file: /cvsroot/dnsmail/dnsmail/Erle.DnsMail.csproj,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Erle.DnsMail.csproj 7 Aug 2006 10:17:47 -0000 1.7 --- Erle.DnsMail.csproj 18 Aug 2006 11:27:16 -0000 1.8 *************** *** 63,66 **** --- 63,106 ---- WarningLevel = "4" /> + <Config + Name = "Debug-Ssl" + AllowUnsafeBlocks = "true" + BaseAddress = "285212672" + CheckForOverflowUnderflow = "false" + ConfigurationOverrideFile = "" + DefineConstants = "DEBUG;TRACE;SSL" + DocumentationFile = "" + DebugSymbols = "true" + FileAlignment = "4096" + IncrementalBuild = "false" + NoStdLib = "false" + NoWarn = "" + Optimize = "false" + OutputPath = "bin\Debug\" + RegisterForComInterop = "false" + RemoveIntegerChecks = "false" + TreatWarningsAsErrors = "false" + WarningLevel = "4" + /> + <Config + Name = "Release-Ssl" + AllowUnsafeBlocks = "true" + BaseAddress = "285212672" + CheckForOverflowUnderflow = "false" + ConfigurationOverrideFile = "" + DefineConstants = "TRACE;SSL" + DocumentationFile = "" + DebugSymbols = "false" + FileAlignment = "4096" + IncrementalBuild = "false" + NoStdLib = "false" + NoWarn = "" + Optimize = "true" + OutputPath = "bin\Release\" + RegisterForComInterop = "false" + RemoveIntegerChecks = "false" + TreatWarningsAsErrors = "false" + WarningLevel = "4" + /> </Settings> <References> Index: UnsafeNativeMethods.cs =================================================================== RCS file: /cvsroot/dnsmail/dnsmail/UnsafeNativeMethods.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** UnsafeNativeMethods.cs 7 Aug 2006 08:25:14 -0000 1.5 --- UnsafeNativeMethods.cs 18 Aug 2006 11:27:17 -0000 1.6 *************** *** 195,199 **** #endregion } ! internal unsafe sealed class UnsafeOpenSsl { --- 195,199 ---- #endregion } ! #if SSL internal unsafe sealed class UnsafeOpenSsl { *************** *** 250,252 **** --- 250,253 ---- internal static extern int i2d_X509(IntPtr cer, byte** ppOut); } + #endif }; Index: Erle.DnsMail.sln =================================================================== RCS file: /cvsroot/dnsmail/dnsmail/Erle.DnsMail.sln,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Erle.DnsMail.sln 1 Mar 2006 18:39:44 -0000 1.1 --- Erle.DnsMail.sln 18 Aug 2006 11:27:17 -0000 1.2 *************** *** 7,17 **** --- 7,23 ---- GlobalSection(SolutionConfiguration) = preSolution Debug = Debug + Debug-Ssl = Debug-Ssl Release = Release + Release-Ssl = Release-Ssl EndGlobalSection GlobalSection(ProjectConfiguration) = postSolution {3E455322-C318-446C-87BA-4E390D201FC2}.Debug.ActiveCfg = Debug|.NET {3E455322-C318-446C-87BA-4E390D201FC2}.Debug.Build.0 = Debug|.NET + {3E455322-C318-446C-87BA-4E390D201FC2}.Debug-Ssl.ActiveCfg = Debug-Ssl|.NET + {3E455322-C318-446C-87BA-4E390D201FC2}.Debug-Ssl.Build.0 = Debug-Ssl|.NET {3E455322-C318-446C-87BA-4E390D201FC2}.Release.ActiveCfg = Release|.NET {3E455322-C318-446C-87BA-4E390D201FC2}.Release.Build.0 = Release|.NET + {3E455322-C318-446C-87BA-4E390D201FC2}.Release-Ssl.ActiveCfg = Release-Ssl|.NET + {3E455322-C318-446C-87BA-4E390D201FC2}.Release-Ssl.Build.0 = Release-Ssl|.NET EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution Index: SmtpClient.cs =================================================================== RCS file: /cvsroot/dnsmail/dnsmail/SmtpClient.cs,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** SmtpClient.cs 11 Aug 2006 14:35:19 -0000 1.8 --- SmtpClient.cs 18 Aug 2006 11:27:17 -0000 1.9 *************** *** 13,23 **** internal class SmtpClient : TcpClient, IDisposable { private IntPtr sslContext = IntPtr.Zero; private IntPtr sslSession = IntPtr.Zero; - private NetworkStream dataStream = null; - - #region .ctor .cctor .dtor private static readonly String _sslVersion; private static readonly bool _sslAvailable; static SmtpClient() { --- 13,26 ---- internal class SmtpClient : TcpClient, IDisposable { + private NetworkStream dataStream = null; + #if SSL private IntPtr sslContext = IntPtr.Zero; private IntPtr sslSession = IntPtr.Zero; private static readonly String _sslVersion; private static readonly bool _sslAvailable; + #endif + + #region .ctor .cctor .dtor + #if SSL static SmtpClient() { *************** *** 46,49 **** --- 49,53 ---- } } + #endif public SmtpClient(IPEndPoint remote, IPEndPoint local, bool useLog) *************** *** 108,112 **** } } ! if (_sslAvailable) { --- 112,116 ---- } } ! #if SSL if (_sslAvailable) { *************** *** 126,129 **** --- 130,134 ---- } } + #endif } base.Dispose(disposing); *************** *** 144,151 **** --- 149,158 ---- get { + #if SSL if (_sslAvailable && !disposed) { return handshake; } + #endif return false; } *************** *** 211,214 **** --- 218,222 ---- get { + #if SSL if (handshake && !disposed) { *************** *** 224,227 **** --- 232,236 ---- return available; } + #endif return base.Client.Available; } *************** *** 229,232 **** --- 238,243 ---- #region Static Properties + + #if SSL public static String OpenSslVersion { *************** *** 238,241 **** --- 249,254 ---- get { return _sslAvailable; } } + #endif + #endregion *************** *** 243,251 **** #region StartTls ! private bool handshake = false; public bool StartTls(bool cerrequest) { bool ret = false; if (_sslAvailable && !disposed && !handshake && (Client.RemoteEndPoint != null)) { --- 256,266 ---- #region StartTls ! #if SSL private bool handshake = false; + #endif public bool StartTls(bool cerrequest) { bool ret = false; + #if SSL if (_sslAvailable && !disposed && !handshake && (Client.RemoteEndPoint != null)) { *************** *** 344,351 **** --- 359,368 ---- } } + #endif return ret; } #endregion + #if SSL #region handle_ssl_error private enum SslError *************** *** 419,422 **** --- 436,440 ---- } #endregion + #endif #region Send & Receive *************** *** 478,481 **** --- 496,500 ---- { int read = -1; + #if SSL if (handshake) { *************** *** 505,508 **** --- 524,528 ---- } else + #endif { read = dataStream.Read(buffer, offset, count); *************** *** 513,516 **** --- 533,537 ---- unsafe public void Write(byte[] buffer, int offset, int count) { + #if SSL if (handshake) { *************** *** 542,545 **** --- 563,567 ---- } else + #endif { dataStream.Write(buffer, offset, count); Index: Erle.DnsMail.csproj.user =================================================================== RCS file: /cvsroot/dnsmail/dnsmail/Erle.DnsMail.csproj.user,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Erle.DnsMail.csproj.user 4 Aug 2006 12:53:36 -0000 1.3 --- Erle.DnsMail.csproj.user 18 Aug 2006 11:27:16 -0000 1.4 *************** *** 35,38 **** --- 35,70 ---- StartWithIE = "true" /> + <Config + Name = "Debug-Ssl" + EnableASPDebugging = "false" + EnableASPXDebugging = "false" + EnableUnmanagedDebugging = "false" + EnableSQLServerDebugging = "false" + RemoteDebugEnabled = "false" + RemoteDebugMachine = "" + StartAction = "Project" + StartArguments = "" + StartPage = "" + StartProgram = "" + StartURL = "" + StartWorkingDirectory = "" + StartWithIE = "true" + /> + <Config + Name = "Release-Ssl" + EnableASPDebugging = "false" + EnableASPXDebugging = "false" + EnableUnmanagedDebugging = "false" + EnableSQLServerDebugging = "false" + RemoteDebugEnabled = "false" + RemoteDebugMachine = "" + StartAction = "Project" + StartArguments = "" + StartPage = "" + StartProgram = "" + StartURL = "" + StartWorkingDirectory = "" + StartWithIE = "true" + /> </Settings> </Build> |
From: Ethem E. <et...@us...> - 2006-08-15 13:29:23
|
Update of /cvsroot/dnsmail/dnsmail/DnsMail In directory sc8-pr-cvs12.sourceforge.net:/tmp/cvs-serv30866/dnsmail/DnsMail Modified Files: MailInfo.cs Log Message: Bumped to 0.5.0.0 (Dev) Index: MailInfo.cs =================================================================== RCS file: /cvsroot/dnsmail/dnsmail/DnsMail/MailInfo.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** MailInfo.cs 7 Aug 2006 11:00:27 -0000 1.2 --- MailInfo.cs 15 Aug 2006 13:29:19 -0000 1.3 *************** *** 189,193 **** } header.AppendFormat("Date: {0}" + "\r\n", __sd); ! header.Append("X-Mailer: Erle.DnsMail.v0.4.0.0" + "\r\n"); // Subject: --- 189,193 ---- } header.AppendFormat("Date: {0}" + "\r\n", __sd); ! header.Append("X-Mailer: Erle.DnsMail.v0.5.0.0" + "\r\n"); // Subject: |
From: Ethem E. <et...@us...> - 2006-08-15 13:29:23
|
Update of /cvsroot/dnsmail/dnsmail In directory sc8-pr-cvs12.sourceforge.net:/tmp/cvs-serv30866/dnsmail Modified Files: AssemblyInfo.cs Log Message: Bumped to 0.5.0.0 (Dev) Index: AssemblyInfo.cs =================================================================== RCS file: /cvsroot/dnsmail/dnsmail/AssemblyInfo.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** AssemblyInfo.cs 4 Aug 2006 13:52:56 -0000 1.4 --- AssemblyInfo.cs 15 Aug 2006 13:29:19 -0000 1.5 *************** *** 11,15 **** // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: ! [assembly: AssemblyVersion("0.4.0.0")] [assembly: AssemblyTitle("Erle.DnsMail")] --- 11,15 ---- // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: ! [assembly: AssemblyVersion("0.5.0.0")] [assembly: AssemblyTitle("Erle.DnsMail")] |
From: Ethem E. <et...@us...> - 2006-08-15 13:07:04
|
Update of /cvsroot/dnsmail/dnsmail/DnsMail In directory sc8-pr-cvs12.sourceforge.net:/tmp/cvs-serv23021/dnsmail/DnsMail Modified Files: DnsMail.cs Log Message: Fixed: Dnsmail.LastCode, LastAnswer, LastResponse Added: Dnsmail.X509Certificate if ssl is set. Index: DnsMail.cs =================================================================== RCS file: /cvsroot/dnsmail/dnsmail/DnsMail/DnsMail.cs,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** DnsMail.cs 11 Aug 2006 14:24:32 -0000 1.16 --- DnsMail.cs 15 Aug 2006 13:07:00 -0000 1.17 *************** *** 64,68 **** public int Port { ! get { return smtpport; } set { --- 64,71 ---- public int Port { ! get ! { ! return smtpport; ! } set { *************** *** 79,87 **** get { ! return ! (helo == null || helo == string.Empty) ! ? DNSAPI.HelloHost : helo; } - set { helo = value; } } --- 82,91 ---- get { ! return (helo == null || helo == string.Empty) ? DNSAPI.HelloHost : helo; ! } ! set ! { ! helo = value; } } *************** *** 89,94 **** public bool UseLog { ! get { return uselog; } ! set { uselog = value; } } --- 93,113 ---- public bool UseLog { ! get ! { ! return uselog; ! } ! set ! { ! uselog = value; ! } ! } ! ! int tickcount = -1; ! public int TickCount ! { ! get ! { ! return tickcount; ! } } *************** *** 103,117 **** return localpoint; } ! set { localpoint = value; } } public int LastCode { ! get { return m_Client.LastCode; } } public string LastAnswer { ! get { return m_Client.LastAnswer; } } --- 122,151 ---- return localpoint; } ! set ! { ! localpoint = value; ! } } public int LastCode { ! get ! { ! if (m_Client != null) ! return m_Client.LastCode; ! ! return 0; ! } } public string LastAnswer { ! get ! { ! if (m_Client != null) ! return m_Client.LastAnswer; ! ! return String.Empty; ! } } *************** *** 120,133 **** get { ! return m_Client.LastResponse; ! } ! } ! public bool SslActive ! { ! get { return (m_Client != null && m_Client.SslActive); } } ! private bool usessl = false; public bool UseSsl { --- 154,165 ---- get { ! if (m_Client != null) ! return m_Client.LastResponse; ! return String.Empty; ! } } ! private bool usessl; public bool UseSsl { *************** *** 136,143 **** } ! int tickcount = -1; ! public int TickCount { ! get { return tickcount; } } --- 168,188 ---- } ! public bool SslActive { ! get ! { ! return (m_Client != null && m_Client.SslActive); ! } ! } ! ! public X509Certificate X509Certificate ! { ! get ! { ! if (m_Client != null) ! return m_Client.X509Certificate; ! ! return null; ! } } *************** *** 508,513 **** --- 553,560 ---- } OnRecipientsAdded(mi.Recipients); + if (rcptcount > 0) OnReadyToSendMassMail(EventArgs.Empty); + return rcptcount; } *************** *** 596,618 **** finalbuffer ? SmtpEncode.All : SmtpEncode.Dot ); ! // FIXME m_Client.Write(buffer, 0, buffer.Length); ! int sent = buffer.Length; ! if ((sent > 0) && sent == buffer.Length) { ! totalsent += tosend; ! remain -= tosend; ! OnSendProgress(totalsent, remain); ! buffer = null; ! if ((totalsent < len) && m_Client.Poll(500, System.Net.Sockets.SelectMode.SelectWrite)) ! { ! goto LOOP; ! } ! } buffchar = null; FINISH: ! len = sent = 0; } finally --- 643,662 ---- finalbuffer ? SmtpEncode.All : SmtpEncode.Dot ); ! m_Client.Write(buffer, 0, buffer.Length); ! ! totalsent += tosend; ! remain -= tosend; ! OnSendProgress(totalsent, remain); ! buffer = null; ! if ((totalsent < len) && m_Client.Poll(500, System.Net.Sockets.SelectMode.SelectWrite)) { ! goto LOOP; ! } buffchar = null; FINISH: ! len = 0; } finally |
From: Ethem E. <et...@us...> - 2006-08-11 14:35:22
|
Update of /cvsroot/dnsmail/dnsmail In directory sc8-pr-cvs12.sourceforge.net:/tmp/cvs-serv6761/dnsmail Modified Files: SmtpClient.cs Log Message: Ignore last exceptions. Index: SmtpClient.cs =================================================================== RCS file: /cvsroot/dnsmail/dnsmail/SmtpClient.cs,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** SmtpClient.cs 8 Aug 2006 10:07:18 -0000 1.7 --- SmtpClient.cs 11 Aug 2006 14:35:19 -0000 1.8 *************** *** 100,104 **** SendAndReceive(quitcmd); } ! catch { throw; } finally { --- 100,104 ---- SendAndReceive(quitcmd); } ! catch { } finally { *************** *** 114,127 **** { try { UnsafeOpenSsl.SSL_shutdown(sslSession); } ! catch { throw; } try { UnsafeOpenSsl.SSL_free(sslSession); } ! catch { throw; } ! finally { sslSession = IntPtr.Zero; } } if (sslContext != IntPtr.Zero) { try { UnsafeOpenSsl.SSL_CTX_free(sslContext); } ! catch { throw; } ! finally { sslContext = IntPtr.Zero; } } } --- 114,127 ---- { try { UnsafeOpenSsl.SSL_shutdown(sslSession); } ! catch { } try { UnsafeOpenSsl.SSL_free(sslSession); } ! catch { } ! sslSession = IntPtr.Zero; } if (sslContext != IntPtr.Zero) { try { UnsafeOpenSsl.SSL_CTX_free(sslContext); } ! catch { } ! sslContext = IntPtr.Zero; } } |
From: Ethem E. <et...@us...> - 2006-08-11 14:24:36
|
Update of /cvsroot/dnsmail/dnsmail/DnsMail In directory sc8-pr-cvs12.sourceforge.net:/tmp/cvs-serv2981/dnsmail/DnsMail Modified Files: DnsMail.cs Log Message: Ignore last exceptions. Index: DnsMail.cs =================================================================== RCS file: /cvsroot/dnsmail/dnsmail/DnsMail/DnsMail.cs,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** DnsMail.cs 10 Aug 2006 10:31:46 -0000 1.15 --- DnsMail.cs 11 Aug 2006 14:24:32 -0000 1.16 *************** *** 219,228 **** m_Client.Close(); } ! catch { throw; } try { OnClosed(EventArgs.Empty); } ! catch { throw; } finally { --- 219,228 ---- m_Client.Close(); } ! catch { } try { OnClosed(EventArgs.Empty); } ! catch { } finally { |
From: Ethem E. <et...@us...> - 2006-08-10 10:31:50
|
Update of /cvsroot/dnsmail/dnsmail/DnsMail In directory sc8-pr-cvs12.sourceforge.net:/tmp/cvs-serv32289/dnsmail/DnsMail Modified Files: DnsMail.cs Log Message: Removed unused namespaces. Index: DnsMail.cs =================================================================== RCS file: /cvsroot/dnsmail/dnsmail/DnsMail/DnsMail.cs,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** DnsMail.cs 10 Aug 2006 10:21:27 -0000 1.14 --- DnsMail.cs 10 Aug 2006 10:31:46 -0000 1.15 *************** *** 3,12 **** { using System; - using System.IO; - using System.Net; - using System.Threading; using System.Collections; - using System.Net.Sockets; using System.Text.RegularExpressions; using StringBuilder = System.Text.StringBuilder; using X509Certificate = System.Security.Cryptography.X509Certificates.X509Certificate; --- 3,10 ---- { using System; using System.Collections; using System.Text.RegularExpressions; + using IPAddress = System.Net.IPAddress; + using IPEndPoint = System.Net.IPEndPoint; using StringBuilder = System.Text.StringBuilder; using X509Certificate = System.Security.Cryptography.X509Certificates.X509Certificate; *************** *** 14,18 **** public class DnsMail : IDisposable, ISendableOneByOne { ! private SmtpClient m_Client; // SMTP Client #region Constants --- 12,16 ---- public class DnsMail : IDisposable, ISendableOneByOne { ! private SmtpClient m_Client; #region Constants *************** *** 532,536 **** else throw new Exception(String.Format( ! "Since the mail server rejected all of recipients (Total={0}), e-mail data cannot be transmitted.", mi.Recipients.Count)); } --- 530,534 ---- else throw new Exception(String.Format( ! "Since the mail server rejected all of the recipients (Total={0}), e-mail data cannot be transmitted.", mi.Recipients.Count)); } *************** *** 607,611 **** OnSendProgress(totalsent, remain); buffer = null; ! if ((totalsent < len) && m_Client.Poll(500, SelectMode.SelectWrite)) { goto LOOP; --- 605,609 ---- OnSendProgress(totalsent, remain); buffer = null; ! if ((totalsent < len) && m_Client.Poll(500, System.Net.Sockets.SelectMode.SelectWrite)) { goto LOOP; *************** *** 622,626 **** try { ! if (m_Client != null && m_Client.Poll(TimeOut, SelectMode.SelectWrite)) m_Client.Write(crlf_dot_crlf, 0, crlf_dot_crlf.Length); } --- 620,624 ---- try { ! if (m_Client != null && m_Client.Poll(TimeOut, System.Net.Sockets.SelectMode.SelectWrite)) m_Client.Write(crlf_dot_crlf, 0, crlf_dot_crlf.Length); } |
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); |
From: Ethem E. <et...@us...> - 2006-08-08 10:07:22
|
Update of /cvsroot/dnsmail/dnsmail In directory sc8-pr-cvs12.sourceforge.net:/tmp/cvs-serv2951/dnsmail Modified Files: SmtpClient.cs Log Message: If send string is null don't compare with QUIT Index: SmtpClient.cs =================================================================== RCS file: /cvsroot/dnsmail/dnsmail/SmtpClient.cs,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** SmtpClient.cs 7 Aug 2006 16:23:35 -0000 1.6 --- SmtpClient.cs 8 Aug 2006 10:07:18 -0000 1.7 *************** *** 436,442 **** public Commands SendAndReceive(String val) { ! bool quit = (val == quitcmd); if (val != null) { byte[] sendBuffer = Encoding.ASCII.GetBytes(val); Write(sendBuffer, 0, sendBuffer.Length); --- 436,443 ---- public Commands SendAndReceive(String val) { ! bool quit = false; if (val != null) { + quit = (val == quitcmd); byte[] sendBuffer = Encoding.ASCII.GetBytes(val); Write(sendBuffer, 0, sendBuffer.Length); |
From: Ethem E. <et...@us...> - 2006-08-07 16:23:39
|
Update of /cvsroot/dnsmail/dnsmail In directory sc8-pr-cvs12.sourceforge.net:/tmp/cvs-serv22221/dnsmail Modified Files: SmtpClient.cs Log Message: Send SSL_shutdown, but don't receive. Index: SmtpClient.cs =================================================================== RCS file: /cvsroot/dnsmail/dnsmail/SmtpClient.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** SmtpClient.cs 7 Aug 2006 15:30:32 -0000 1.5 --- SmtpClient.cs 7 Aug 2006 16:23:35 -0000 1.6 *************** *** 113,116 **** --- 113,118 ---- if (sslSession != IntPtr.Zero) { + try { UnsafeOpenSsl.SSL_shutdown(sslSession); } + catch { throw; } try { UnsafeOpenSsl.SSL_free(sslSession); } catch { throw; } *************** *** 260,264 **** const int SSL_OP_ALL = 0x00000FFF; ! UnsafeOpenSsl.SSL_set_quiet_shutdown(sslSession, 1); UnsafeOpenSsl.SSL_ctrl(sslSession, SSL_CTRL_OPTIONS, SSL_OP_ALL, IntPtr.Zero); UnsafeOpenSsl.SSL_set_fd(sslSession, Client.Handle); --- 262,266 ---- const int SSL_OP_ALL = 0x00000FFF; ! //UnsafeOpenSsl.SSL_set_quiet_shutdown(sslSession, 1); UnsafeOpenSsl.SSL_ctrl(sslSession, SSL_CTRL_OPTIONS, SSL_OP_ALL, IntPtr.Zero); UnsafeOpenSsl.SSL_set_fd(sslSession, Client.Handle); |
From: Ethem E. <et...@us...> - 2006-08-07 15:37:12
|
Update of /cvsroot/dnsmail/dnsmail/DnsMail In directory sc8-pr-cvs12.sourceforge.net:/tmp/cvs-serv32389/dnsmail/DnsMail Modified Files: DnsMail.cs Log Message: Clear log buffer after connection closed. Index: DnsMail.cs =================================================================== RCS file: /cvsroot/dnsmail/dnsmail/DnsMail/DnsMail.cs,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** DnsMail.cs 7 Aug 2006 15:30:31 -0000 1.12 --- DnsMail.cs 7 Aug 2006 15:37:09 -0000 1.13 *************** *** 228,236 **** } catch { throw; } m_Client = null; } - /*************************************************** - * Release managed objects if disposing = TRUE. - ***************************************************/ if (disposing) { --- 228,237 ---- } catch { throw; } + finally + { + m_Client.UseLog = false; + } m_Client = null; } if (disposing) { |
From: Ethem E. <et...@us...> - 2006-08-07 15:30:36
|
Update of /cvsroot/dnsmail/dnsmail/DnsMail In directory sc8-pr-cvs12.sourceforge.net:/tmp/cvs-serv29370/dnsmail/DnsMail Modified Files: DnsMail.cs Log Message: SmtpClient.UseLog ASAP to log initial message. Call SmtpClient.Close first to log last message. Index: DnsMail.cs =================================================================== RCS file: /cvsroot/dnsmail/dnsmail/DnsMail/DnsMail.cs,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** DnsMail.cs 7 Aug 2006 11:33:39 -0000 1.11 --- DnsMail.cs 7 Aug 2006 15:30:31 -0000 1.12 *************** *** 218,224 **** if (m_Client != null) { ! m_Client.Close(); m_Client = null; - OnClosed(EventArgs.Empty); } /*************************************************** --- 218,232 ---- if (m_Client != null) { ! try ! { ! m_Client.Close(); ! } ! catch { throw; } ! try ! { ! OnClosed(EventArgs.Empty); ! } ! catch { throw; } m_Client = null; } /*************************************************** *************** *** 227,231 **** if (disposing) { - UseLog = false; m_RcptCount ^= m_RcptCount; } --- 235,238 ---- *************** *** 479,483 **** { IPEndPoint remote = new IPEndPoint(ip, Port); ! m_Client = new SmtpClient(remote, LocalPoint); OnConnect(ip.ToString()); ret = true; --- 486,490 ---- { IPEndPoint remote = new IPEndPoint(ip, Port); ! m_Client = new SmtpClient(remote, LocalPoint, UseLog); OnConnect(ip.ToString()); ret = true; |
From: Ethem E. <et...@us...> - 2006-08-07 15:30:36
|
Update of /cvsroot/dnsmail/dnsmail In directory sc8-pr-cvs12.sourceforge.net:/tmp/cvs-serv29370/dnsmail Modified Files: SmtpClient.cs Log Message: SmtpClient.UseLog ASAP to log initial message. Call SmtpClient.Close first to log last message. Index: SmtpClient.cs =================================================================== RCS file: /cvsroot/dnsmail/dnsmail/SmtpClient.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** SmtpClient.cs 7 Aug 2006 15:10:32 -0000 1.4 --- SmtpClient.cs 7 Aug 2006 15:30:32 -0000 1.5 *************** *** 47,51 **** } ! public SmtpClient(IPEndPoint remote, IPEndPoint local) : base(local) { --- 47,51 ---- } ! public SmtpClient(IPEndPoint remote, IPEndPoint local, bool useLog) : base(local) { *************** *** 57,60 **** --- 57,61 ---- if (Client.Poll(21000000, SelectMode.SelectRead)) { + UseLog = useLog; dataStream = GetStream(); recvBuffer = new byte[256]; |
From: Ethem E. <et...@us...> - 2006-08-07 15:10:39
|
Update of /cvsroot/dnsmail/dnsmail In directory sc8-pr-cvs12.sourceforge.net:/tmp/cvs-serv20526/dnsmail Modified Files: SmtpClient.cs Log Message: Initailize buffers before receiving data. Index: SmtpClient.cs =================================================================== RCS file: /cvsroot/dnsmail/dnsmail/SmtpClient.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** SmtpClient.cs 7 Aug 2006 11:33:39 -0000 1.3 --- SmtpClient.cs 7 Aug 2006 15:10:32 -0000 1.4 *************** *** 55,67 **** LingerState = new LingerOption(true, 5); Connect(remote); ! if (!Client.Poll(21000000, SelectMode.SelectRead) || ! SendAndReceive(null) != Commands.Ok) { throw new MailServerException(LastResponse); } ! ! dataStream = GetStream(); ! recvBuffer = new byte[256]; ! esmtp = (LastAnswer.ToLower().IndexOf("esmtp") != -1); } --- 55,70 ---- LingerState = new LingerOption(true, 5); Connect(remote); ! if (Client.Poll(21000000, SelectMode.SelectRead)) { + dataStream = GetStream(); + recvBuffer = new byte[256]; + if (SendAndReceive(null) == Commands.Ok) + { + esmtp = (LastAnswer.ToLower().IndexOf("esmtp") != -1); + return; + } throw new MailServerException(LastResponse); } ! throw new MailServerException(String.Empty); } *************** *** 89,99 **** disposed = true; - if (disposing) - { - UseLog = false; - x509cert = null; - recvBuffer = null; - } - if (dataStream != null) { --- 92,95 ---- *************** *** 426,430 **** private const int MaxBuffer = 8192; private const string quitcmd = "QUIT\r\n"; ! internal enum Commands : byte { Pending = 0, --- 422,426 ---- private const int MaxBuffer = 8192; private const string quitcmd = "QUIT\r\n"; ! internal enum Commands { Pending = 0, *************** *** 455,459 **** breceived += bytes; tmpResp += Encoding.ASCII.GetString(recvBuffer, 0, bytes); ! } while (tmpResp[tmpResp.Length - 1] != '\n' && Client.Poll(500, SelectMode.SelectRead)); if (tmpResp.Length < 4) --- 451,459 ---- breceived += bytes; tmpResp += Encoding.ASCII.GetString(recvBuffer, 0, bytes); ! if (tmpResp[tmpResp.Length - 1] == '\n') ! { ! break; ! } ! } while (Client.Poll(500, SelectMode.SelectRead)); if (tmpResp.Length < 4) *************** *** 465,474 **** if (!quit) { ! string log = tmpResp.Trim(); ! lastcode = int.Parse(log.Substring(0, 3)); ! lastanswer = log.Substring(4); } ! ! return (Commands)Convert.ToByte(tmpResp[0]); } --- 465,472 ---- if (!quit) { ! lastcode = int.Parse(tmpResp.Substring(0, 3)); ! lastanswer = tmpResp.Substring(4).Trim(); } ! return (Commands)Enum.Parse(typeof(Commands), tmpResp.Substring(0, 1)); } |
From: Ethem E. <et...@us...> - 2006-08-07 11:33:43
|
Update of /cvsroot/dnsmail/dnsmail/DnsMail In directory sc8-pr-cvs12.sourceforge.net:/tmp/cvs-serv748/dnsmail/DnsMail Modified Files: DnsMail.cs Log Message: Some backward compatibles. Index: DnsMail.cs =================================================================== RCS file: /cvsroot/dnsmail/dnsmail/DnsMail/DnsMail.cs,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** DnsMail.cs 7 Aug 2006 11:26:06 -0000 1.10 --- DnsMail.cs 7 Aug 2006 11:33:39 -0000 1.11 *************** *** 109,112 **** --- 109,130 ---- } + public int LastCode + { + get { return m_Client.LastCode; } + } + + public string LastAnswer + { + get { return m_Client.LastAnswer; } + } + + public string LastResponse + { + get + { + return m_Client.LastResponse; + } + } + public bool SslActive { |
From: Ethem E. <et...@us...> - 2006-08-07 11:33:42
|
Update of /cvsroot/dnsmail/dnsmail In directory sc8-pr-cvs12.sourceforge.net:/tmp/cvs-serv748/dnsmail Modified Files: SmtpClient.cs Log Message: Some backward compatibles. Index: SmtpClient.cs =================================================================== RCS file: /cvsroot/dnsmail/dnsmail/SmtpClient.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** SmtpClient.cs 7 Aug 2006 10:55:01 -0000 1.2 --- SmtpClient.cs 7 Aug 2006 11:33:39 -0000 1.3 *************** *** 208,212 **** } ! public new int Available { get --- 208,212 ---- } ! public int Available { get *************** *** 225,229 **** return available; } ! return base.Available; } } --- 225,229 ---- return available; } ! return base.Client.Available; } } |
From: Ethem E. <et...@us...> - 2006-08-07 11:26:10
|
Update of /cvsroot/dnsmail/dnsmail/DnsMail In directory sc8-pr-cvs12.sourceforge.net:/tmp/cvs-serv30273/dnsmail/DnsMail Modified Files: DnsMail.cs Log Message: - Old SmtpStream removed, new SmtpClient added. - Encoding member moved to MailInfo. - LastCode, LastAnswer, LastResponse moved to SmtpClient (It will be redesigned for backward compatible). - Authenticated and SentHandler converted to EventHandler. - sayhello, sslbegin, login and sendmailfrom are in initialize now, rcptto removed. - InternalResolve prototype changed. - Mail header creation moved to MailInfo.ToString(to,count) - SendAndReceive moved to new SmtpClient. - Coding art. tabs, spaces, etc... :) Index: DnsMail.cs =================================================================== RCS file: /cvsroot/dnsmail/dnsmail/DnsMail/DnsMail.cs,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** DnsMail.cs 7 Aug 2006 08:43:41 -0000 1.9 --- DnsMail.cs 7 Aug 2006 11:26:06 -0000 1.10 *************** *** 9,41 **** using System.Net.Sockets; using System.Text.RegularExpressions; - using Encoding = System.Text.Encoding; - using HttpContext = System.Web.HttpContext; - using HttpRequest = System.Web.HttpRequest; using StringBuilder = System.Text.StringBuilder; - using DTFI = System.Globalization.DateTimeFormatInfo; using X509Certificate = System.Security.Cryptography.X509Certificates.X509Certificate; public class DnsMail : IDisposable, ISendableOneByOne [...1293 lines suppressed...] } buffchar = null; ! FINISH: len = sent = 0; } ! finally { ! try { ! if (m_Client != null && m_Client.Poll(TimeOut, SelectMode.SelectWrite)) ! m_Client.Write(crlf_dot_crlf, 0, crlf_dot_crlf.Length); } ! catch { } } } #endregion } }; |
From: Ethem E. <et...@us...> - 2006-08-07 11:06:13
|
Update of /cvsroot/dnsmail/dnsmail/DnsMail In directory sc8-pr-cvs12.sourceforge.net:/tmp/cvs-serv22243/dnsmail/DnsMail Modified Files: RecipientCollection.cs Log Message: Coding art. tabs, spaces, etc... :) Index: RecipientCollection.cs =================================================================== RCS file: /cvsroot/dnsmail/dnsmail/DnsMail/RecipientCollection.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** RecipientCollection.cs 2 Mar 2006 16:54:06 -0000 1.1 --- RecipientCollection.cs 7 Aug 2006 11:06:09 -0000 1.2 *************** *** 7,13 **** public sealed class RecipientCollection : ArrayList { ! public RecipientCollection() : base() {} ! public RecipientCollection(int capacity) : base(capacity) {} ! public RecipientCollection(bool usesMailServer) : this() { ums = usesMailServer; --- 7,14 ---- public sealed class RecipientCollection : ArrayList { ! public RecipientCollection() : base() { } ! public RecipientCollection(int capacity) : base(capacity) { } ! public RecipientCollection(bool usesMailServer) ! : this() { ums = usesMailServer; *************** *** 20,36 **** Recipient tmpAdd; ! if( recipient is Recipient ) tmpAdd = recipient as Recipient; ! else if( recipient is String ) tmpAdd = new Recipient(recipient as String); else ! throw new ArgumentException(String.Format("Add a Recipient or String object. You used: {0}", recipient.GetType().FullName), "recipient"); ! if( (tmpAdd.Email == null) || (tmpAdd.Email == string.Empty) ) throw new EmailException(String.Format("Email address cannot be null. Count: {0}", Count)); if (!ums) { ! if (Count == 0) { if ((domain = DnsMail.FindEmailDomain(tmpAdd.Email)) == null) --- 21,37 ---- Recipient tmpAdd; ! if (recipient is Recipient) tmpAdd = recipient as Recipient; ! else if (recipient is String) tmpAdd = new Recipient(recipient as String); else ! throw new ArgumentException(String.Format("Add a Recipient or String object. You used: {0}", recipient.GetType().FullName), "recipient"); ! if ((tmpAdd.Email == null) || (tmpAdd.Email == string.Empty)) throw new EmailException(String.Format("Email address cannot be null. Count: {0}", Count)); if (!ums) { ! if (Count == 0) { if ((domain = DnsMail.FindEmailDomain(tmpAdd.Email)) == null) *************** *** 39,43 **** else { ! if( domain != DnsMail.FindEmailDomain(tmpAdd.Email) ) throw new EmailException(String.Format("{0} cannot add; All Recipients' domains must be @{1}.", tmpAdd.Email, domain)); } --- 40,44 ---- else { ! if (domain != DnsMail.FindEmailDomain(tmpAdd.Email)) throw new EmailException(String.Format("{0} cannot add; All Recipients' domains must be @{1}.", tmpAdd.Email, domain)); } *************** *** 53,57 **** } ! public override Object this[int index] { get { return base[index]; } --- 54,58 ---- } ! public override Object this[int index] { get { return base[index]; } *************** *** 59,63 **** } ! public override void Insert(int index, Object recipient) { this.Add(recipient); --- 60,64 ---- } ! public override void Insert(int index, Object recipient) { this.Add(recipient); *************** *** 66,70 **** private bool ums; private string domain; ! public string Domain { get { return domain; } --- 67,71 ---- private bool ums; private string domain; ! public string Domain { get { return domain; } |
From: Ethem E. <et...@us...> - 2006-08-07 11:05:15
|
Update of /cvsroot/dnsmail/dnsmail/DnsMail In directory sc8-pr-cvs12.sourceforge.net:/tmp/cvs-serv21845/dnsmail/DnsMail Modified Files: Recipient.cs Log Message: Coding art. tabs, spaces, etc... :) Index: Recipient.cs =================================================================== RCS file: /cvsroot/dnsmail/dnsmail/DnsMail/Recipient.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Recipient.cs 9 Mar 2006 18:03:43 -0000 1.2 --- Recipient.cs 7 Aug 2006 11:05:12 -0000 1.3 *************** *** 6,11 **** public class Recipient : IRecipient { ! public Recipient(String email) : this(0, email) {} ! public Recipient(int id, String email) { if (email == null || email == String.Empty) --- 6,11 ---- public class Recipient : IRecipient { ! public Recipient(String email) : this(0, email) { } ! public Recipient(int id, String email) { if (email == null || email == String.Empty) *************** *** 15,41 **** this.email = email.Trim(); } ! public override bool Equals(Object recipient) { if (recipient is Recipient) return String.Compare(Email, (recipient as Recipient).Email, true) == 0; ! else if(recipient is String) return String.Compare(Email, recipient as String, true) == 0; else return false; } ! public override int GetHashCode() { return (id != 0) ? id : Email.GetHashCode(); } ! ! public override String ToString() { ! return((Email==null) ? String.Empty : Email); } private readonly int id; ! public int Id { get { return id; } --- 15,41 ---- this.email = email.Trim(); } ! public override bool Equals(Object recipient) { if (recipient is Recipient) return String.Compare(Email, (recipient as Recipient).Email, true) == 0; ! else if (recipient is String) return String.Compare(Email, recipient as String, true) == 0; else return false; } ! public override int GetHashCode() { return (id != 0) ? id : Email.GetHashCode(); } ! ! public override String ToString() { ! return ((Email == null) ? String.Empty : Email); } private readonly int id; ! public int Id { get { return id; } *************** *** 55,59 **** internal int code = -1; ! public int Code { get { return code; } --- 55,59 ---- internal int code = -1; ! public int Code { get { return code; } *************** *** 61,65 **** internal string answer = String.Empty; ! public string Answer { get { return answer; } --- 61,65 ---- internal string answer = String.Empty; ! public string Answer { get { return answer; } *************** *** 81,83 **** #endregion } ! }; \ No newline at end of file --- 81,83 ---- #endregion } ! }; |
From: Ethem E. <et...@us...> - 2006-08-07 11:04:10
|
Update of /cvsroot/dnsmail/dnsmail/DnsMail In directory sc8-pr-cvs12.sourceforge.net:/tmp/cvs-serv21156/dnsmail/DnsMail Modified Files: MxRecordComparer.cs Log Message: Coding art. tabs, spaces, etc... :) Index: MxRecordComparer.cs =================================================================== RCS file: /cvsroot/dnsmail/dnsmail/DnsMail/MxRecordComparer.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** MxRecordComparer.cs 2 Mar 2006 16:47:07 -0000 1.1 --- MxRecordComparer.cs 7 Aug 2006 11:04:05 -0000 1.2 *************** *** 8,12 **** { public static readonly MxRecordComparer Default = new MxRecordComparer(); ! private MxRecordComparer(){} public int Compare(Object mx1, Object mx2) { --- 8,12 ---- { public static readonly MxRecordComparer Default = new MxRecordComparer(); ! private MxRecordComparer() { } public int Compare(Object mx1, Object mx2) { *************** *** 19,21 **** } } ! }; \ No newline at end of file --- 19,21 ---- } } ! }; |