Reputation: 6122
I am trying to change the subject line of email sent by Enterprise Library 5. I don't mean changing the subject line Starter/Ender (as seen in http://entlib.codeplex.com/discussions/69689?ProjectName=entlib), I want to change the actual Subject text, which is not the same as the Logger's Message Title.
All ideas appreciated.
Thanks.
Upvotes: 1
Views: 700
Reputation: 40863
Looking at the source for EmailMessage
in Enterprise Library 5 the subject is generated by
string sendToSmtpSubject = header + logEntry.Severity.ToString() + footer;
If you need to have complete control of the subject line in your email message you will need to extend the existing EmailTraceListener
to include your added functionality. (or simply modify the code and use your custom build of EntLib in your application).
Upvotes: 1