/// <summary>
 /// Delivers the trace data as an email message.
 /// </summary>
 /// <param name="eventCache">The context information provided by <see cref="System.Diagnostics"/>.</param>
 /// <param name="source">The name of the trace source that delivered the trace data.</param>
 /// <param name="eventType">The type of event.</param>
 /// <param name="id">The id of the event.</param>
 /// <param name="data">The data to trace.</param>
 public override void TraceData(TraceEventCache eventCache, string source, TraceEventType eventType, int id, object data)
 {
     if ((this.Filter == null) || this.Filter.ShouldTrace(eventCache, source, eventType, id, null, null, data, null))
     {
         if (data is LogEntry)
         {
             EmailMessage message = new EmailMessage(toAddress, fromAddress, subjectLineStarter, subjectLineEnder, smtpServer, smtpPort, data as LogEntry, this.Formatter, authenticationMode, userName, password, useSSL);
             message.Send();
         }
         else if (data is string)
         {
             Write(data);
         }
         else
         {
             base.TraceData(eventCache, source, eventType, id, data);
         }
     }
 }
		/// <summary>
		/// Delivers the trace data as an email message.
		/// </summary>
		/// <param name="eventCache">The context information provided by <see cref="System.Diagnostics"/>.</param>
		/// <param name="source">The name of the trace source that delivered the trace data.</param>
		/// <param name="eventType">The type of event.</param>
		/// <param name="id">The id of the event.</param>
		/// <param name="data">The data to trace.</param>
		public override void TraceData(TraceEventCache eventCache, string source, TraceEventType eventType, int id, object data)
		{
			if (data is LogEntry)
			{
				EmailMessage message = new EmailMessage(toAddress, fromAddress, subjectLineStarter, subjectLineEnder, smtpServer, smtpPort, data as LogEntry, this.Formatter);
				message.Send();
				InstrumentationProvider.FireTraceListenerEntryWrittenEvent();
			}
			else if (data is string)
			{
				Write(data);
			}
			else
			{
				base.TraceData(eventCache, source, eventType, id, data);
			}
		}
 /// <summary>
 /// Sends an email message given a predefined string
 /// </summary>
 /// <param name="message">The string to write as the email message</param>
 public override void Write(string message)
 {
     EmailMessage mailMessage =
         new EmailMessage(toAddress, fromAddress, subjectLineStarter, subjectLineEnder, smtpServer, smtpPort, message, this.Formatter, authenticationMode, userName, password, useSSL);
     mailMessage.Send();
 }
		/// <summary>
		/// Sends an email message given a predefined string
		/// </summary>
		/// <param name="message">The string to write as the email message</param>
		public override void Write(string message)
		{
			EmailMessage mailMessage = new EmailMessage(toAddress, fromAddress, subjectLineStarter, subjectLineEnder, smtpServer, smtpPort, message, this.Formatter);
			mailMessage.Send();
		}