locked
Email trace listener - unable to connect to remote server RRS feed

  • Question

  • User42760572 posted

    Hi,

    I have an exception policy block with a logging handler pointing to a category, the category has the following trace listeners:

    1. Rolling Flat file trace listener (successfully runs)
    2. Formatted EventLog trace listener (successfully runs)
    3. Email TraceListener (error!)

    The settings for the email trace listener are:

    1. a valid text formatter (also used in other listeners)
    2. a valid from address
    3. SMTP port 25
    4. SMTP server: 127.0.0.1
    5. subject line ender: EventLogFactory
    6. Subject line starter: sensitive Error mail
    7. a valid to address
    8. TraceOutputOptions: LogicalOperationStack

    I keep getting an error unable to connect to remote server. If i send an email via .Net through my own code (system.Net.Mail) it goes through successfully and lands up in my pickup folder, however in this case there is no mail in the pickup and an error log is generated which says connect failure.

    Can somebody please tell me where i'm going wrong.

    Wednesday, December 9, 2009 6:28 AM

All replies

  • User220959680 posted

    SMTP server: 127.0.0.1

    This has to be your SMTP server. check the SMTP server and replace the 127.0.0.1. Note that your .Net code works fine as long as it is on your local machine. It does not work when you upload the same on to web server.

    Here is how Listeners setting should look like:

    <add toAddress="<To Address>" 
    fromAddress=""From Address>"
    subjectLineStarter="" 
    subjectLineEnder=":Exception Trace" 
    smtpServer="<your SMTP server" 
    smtpPort="25" 
    formatter="Text Formatter" listenerDataType="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.EmailTraceListenerData, Microsoft.Practices.EnterpriseLibrary.Logging, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" traceOutputOptions="None" filter="All" type="Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.EmailTraceListener, Microsoft.Practices.EnterpriseLibrary.Logging, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" name="Email TraceListener"/>



    Wednesday, December 9, 2009 8:08 AM
  • User42760572 posted

    Thanks for replying...

    isnt there any setting through which i can run it from my local and get it in my pick up folder?


    Wednesday, December 9, 2009 10:11 AM