Knowledge base

Logging email diagnostic information


In some cases you may need to verify how the system is interacting with your mail server. This article explains how you can set up the system to log detailed diagnostic information whenever the system sends emails. 


The system can generate a log file that logs every command sent to your mail server along with your mail server's response.

Steps to take (Xcb 1.x)

  1. First decide whether you want to log information for the Xcb web application OR the notification system.
  2. Open the appropriate configuration file in Notepad:
    • For the Xcb web application: Program Files\Xtheta\Xcb\WebApp\Web.Config
    • For the notification system: Program Files\Xtheta\Xcb\ServiceRunner.exe.config
  3. Scroll to the bottom of the file, and look for the line that says:
  4. Directly above that line, add the following text (you can substitute in your own log file name by following the **NOTE** below):

                    <!-- NOTE: You can change the filenames here if you want the log to be somewhere else.  
                               Please don't make any other changes besides the filename.                 
                    <add name="SMTPTRACE" type="System.Diagnostics.TextWriterTraceListener" initializeData="SMTP.LOG" />
                    <add name="NOTIFTRACE" type="System.Diagnostics.TextWriterTraceListener" initializeData="NOTIF.LOG" />
                <trace autoflush="true" />
                    <source name="Xcb.Notifications">
                            <add name="NOTIFTRACE"/>
                    <source name="System.Net">
                            <add name="SMTPTRACE"/>
                    <source name="System.Net.Sockets">
                            <add name="SMTPTRACE"/>
                    <add name="Xcb.Notifications" value="Verbose" />
                    <add name="System.Net" value="Verbose" />
                    <add name="System.Net.Sockets" value="Verbose" />

  5. Save the file.   If you're logging information for the notification system, you'll need to restart the notification service to make the changes take effect.  You don't need to restart anything if you're logging for the web application.
  6. When you no longer need the logging turned on, please remove the section and restart notifications (if needed).

Additional information

Please note that this log file gets large very quickly, so you should only enable logging on a short term basis. 


  • Intermediate - Not too bad but grab a cup of coffee first!

Applies to

General information

  • Last updated: 4/3/2015

Any feedback is appreciated