I'm trying to configure an email trace listener in Ent Lib 5.0 (without the optional update 1). No matter what I do, it won't send emails.
I've created a very simple test app and that won't send the emails either. The Database Trace Listener works, so I'm certain that the entries are getting caught by the logger. They just aren't being processed by the email trace listener.
I've tried configuring the special categories to capture log errors that could be occurring, but nothing gets logged from that.
The severity filters on the category and the listener are both set to "All". Auto Flush on the category is set to true. I've tried with a formatter and without, same result. I've tried an IP for SMTP server instead of the FQDN,
Can anyone help with this?
1) Are there any specific assembly references I need to add for the Email Trace Listener? Does anyone know the exact set of references that will work for this?
2) I've tried many SMTP servers, including gmail. They work outside of logging, even when I use an SmtpClient straight from my test app. The SmtpClient will send using the same credentials as the logger, but the logger doesn't send.
Trace listener config is below.
<listeners> <add name="Email Trace Listener" type="Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.EmailTraceListener, Microsoft.Practices.EnterpriseLibrary.Logging,
Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" listenerDataType="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.EmailTraceListenerData, Microsoft.Practices.EnterpriseLibrary.Logging,
Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" toAddress="email@example.com" fromAddress="firstname.lastname@example.org"
subjectLineStarter="AAA" subjectLineEnder="ZZZ" smtpServer="smtp.gmail.com" smtpPort="587" authenticationMode="UserNameAndPassword" useSSL="true"
userName="email@example.com" password="passwordobscured" /> </listeners>