ComponentSpace Trace Listeners Class Library Reference

SmtpTraceListener Class

The SmtpTraceListener is a trace listener that emails messages.

For a list of all members of this type, see SmtpTraceListener Members.

System.Object
   System.MarshalByRefObject
      System.Diagnostics.TraceListener
         ComponentSpace.TraceListeners.SmtpTraceListener

[Visual Basic]
Public Class SmtpTraceListener
    Inherits TraceListener
[C#]
public class SmtpTraceListener : TraceListener

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Remarks

The following is an example of configuring the trace listener using the application's XML configuration file.

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <system.diagnostics>
    <trace autoflush="true" indentsize="4">
      <listeners>
        <add
          name="SmtpTraceListener"
          type="ComponentSpace.TraceListeners.SmtpTraceListener,ComponentSpace.TraceListeners"
          initializeData="fromAddress='tracesource@mycompany.com',
                          toAddress='tracedest@mycompany.com',
                          subject='trace',
                          mailServer='mail.mycompany.com'"/>
      </listeners>
    </trace>
  </system.diagnostics>
</configuration>

Requirements

Namespace: ComponentSpace.TraceListeners

Assembly: ComponentSpace.TraceListeners (in ComponentSpace.TraceListeners.dll)

See Also

SmtpTraceListener Members | ComponentSpace.TraceListeners Namespace