EntLib 5 Email Subject Line Edit?
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.
开发者_JS百科All ideas appreciated.
Thanks.
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).
精彩评论