开发者

EntLib 5 Email Subject Line Edit?

开发者 https://www.devze.com 2023-02-14 16:51 出处:网络
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

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).

0

精彩评论

暂无评论...
验证码 换一张
取 消