You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4net-dev@logging.apache.org by ni...@apache.org on 2005/08/29 01:59:18 UTC

cvs commit: logging-log4net/src/Appender SmtpAppender.cs

nicko       2005/08/28 16:59:18

  Modified:    src/Appender SmtpAppender.cs
  Log:
  Fix for LOG4NET-15. Add mail message Priority property to SmtpAppender
  
  Revision  Changes    Path
  1.9       +25 -0     logging-log4net/src/Appender/SmtpAppender.cs
  
  Index: SmtpAppender.cs
  ===================================================================
  RCS file: /home/cvs/logging-log4net/src/Appender/SmtpAppender.cs,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- SmtpAppender.cs	17 Jan 2005 20:18:42 -0000	1.8
  +++ SmtpAppender.cs	28 Aug 2005 23:59:18 -0000	1.9
  @@ -243,6 +243,28 @@
   			set { m_port = value; }
   		}
   
  +		/// <summary>
  +		/// Gets or sets the priority of the e-mail message
  +		/// </summary>
  +		/// <value>
  +		/// One of the <see cref="MailPriority"/> values.
  +		/// </value>
  +		/// <remarks>
  +		/// <para>
  +		/// Sets the priority of the e-mails generated by this
  +		/// appender. The default priority is <see cref="MailPriority.Normal"/>.
  +		/// </para>
  +		/// <para>
  +		/// If you are using this appender to report errors then
  +		/// you may want to set the priority to <see cref="MailPriority.High"/>.
  +		/// </para>
  +		/// </remarks>
  +		public MailPriority Priority
  +		{
  +			get { return m_mailPriority; }
  +			set { m_mailPriority = value; }
  +		}
  +
   		#endregion // Public Instance Properties
   
   		#region Override implementation of BufferingAppenderSkeleton
  @@ -282,6 +304,7 @@
   				mailMessage.From = m_from;
   				mailMessage.To = m_to;
   				mailMessage.Subject = m_subject;
  +				mailMessage.Priority = m_mailPriority;
   
   #if NET_1_1
   				// The Fields property on the MailMessage allows the CDO properties to be set directly.
  @@ -379,6 +402,8 @@
   		// server port, default port 25
   		private int m_port = 25;
   
  +		private MailPriority m_mailPriority = MailPriority.Normal;
  +
   		#endregion // Private Instance Fields
   
   		#region SmtpAuthentication Enum