MessageParserConfigAHRefCleanup Property |
Namespace: MailBee.Mime
You can use this and AHRefSuffix properties together to decorate <A HREF> tags, for instance, remove Target attribute and add target=_blank to every <A HREF> tag to make links open in a new window.
Note |
---|
MessageParserConfig object cannot be used on its own. To access its members, the developer should use MailMessage.Parser property. |
If you need more advanced methods to post-process HTML body (such as to remove or block unsafe content like Javascript or external images), consider using Processor class and HTML processing rules (for instance, GetSafeHtmlRules).
// To use the code below, import MailBee namespaces at the top of your code. using MailBee; using MailBee.Mime; // The actual code (put it into a method of your class). MailMessage msg = new MailMessage(); msg.LoadMessage(@"C:\Docs\TestMail.eml"); msg.Parser.AHRefCleanup = AHRefTagAttributes.Onclick; msg.Parser.Apply();