logging-log4net-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rgrabow...@apache.org
Subject svn commit: r667802 - /logging/log4net/trunk/src/Appender/SmtpAppender.cs
Date Sat, 14 Jun 2008 14:02:21 GMT
Author: rgrabowski
Date: Sat Jun 14 07:02:21 2008
New Revision: 667802

URL: http://svn.apache.org/viewvc?rev=667802&view=rev
Log:
Fix for LOG4NET-116. Added EnableSsl property to SmtpAppender for .NET 2.0.

Modified:
    logging/log4net/trunk/src/Appender/SmtpAppender.cs

Modified: logging/log4net/trunk/src/Appender/SmtpAppender.cs
URL: http://svn.apache.org/viewvc/logging/log4net/trunk/src/Appender/SmtpAppender.cs?rev=667802&r1=667801&r2=667802&view=diff
==============================================================================
--- logging/log4net/trunk/src/Appender/SmtpAppender.cs (original)
+++ logging/log4net/trunk/src/Appender/SmtpAppender.cs Sat Jun 14 07:02:21 2008
@@ -307,6 +307,20 @@
 			set { m_mailPriority = value; }
 		}
 
+#if NET_2_0
+        /// <summary>
+        /// Enable or disable use of SSL when sending e-mail message
+        /// </summary>
+        /// <remarks>
+        /// This is available on MS .NET 2.0 runtime and higher
+        /// </remarks>
+        public bool EnableSsl
+        {
+            get { return m_enableSsl; }
+            set { m_enableSsl = value; }
+        }
+#endif
+
 		#endregion // Public Instance Properties
 
 		#region Override implementation of BufferingAppenderSkeleton
@@ -390,6 +404,7 @@
 			}
 			smtpClient.Port = m_port;
 			smtpClient.DeliveryMethod = SmtpDeliveryMethod.Network;
+            smtpClient.EnableSsl = m_enableSsl;
 
 			if (m_authentication == SmtpAuthentication.Basic)
 			{
@@ -516,6 +531,10 @@
 
 		private MailPriority m_mailPriority = MailPriority.Normal;
 
+#if NET_2_0
+        private bool m_enableSsl = false;
+#endif
+
 		#endregion // Private Instance Fields
 
 		#region SmtpAuthentication Enum
@@ -556,4 +575,4 @@
 	}
 }
 
-#endif // !NETCF && !SSCLI
\ No newline at end of file
+#endif // !NETCF && !SSCLI



Mime
View raw message