Gets or sets the options of processing <A HREF> tags in the HTML body.
A set of flags specifying the attributes which should be removed from all <A HREF> tags. The default value is None.
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.
This sample loads the message from .EML file and removes all Onclick attributes from all <A HREF> tags.
[C#] // 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();
[Visual Basic] ' To use the code below, import MailBee namespaces at the top of your code. Imports MailBee Imports MailBee.Mime ' The actual code (put it into a method of your class). Dim msg As New MailMessage msg.LoadMessage("C:\Docs\TestMail.eml") msg.Parser.AHRefCleanup = AHRefTagAttributes.Onclick msg.Parser.Apply()
MessageParserConfig Class | MailBee.Mime Namespace | AHRefSuffix | Processor