Author |
|
mattnkara Newbie
Joined: 06 November 2012
Online Status: Offline Posts: 3
|
Posted: 06 November 2012 at 12:37pm | IP Logged
|
|
|
Hi,
I want to make sure that I am parsing my email in the correct sequence.
' Use MIME to clean to remove all attributes from A HREF
' and insert target=_blank instead.
msg.Parser.AHRefCleanup = AHRefTagAttributes.ClassAndStyle Or AHRefTagAttributes.Onclick Or AHRefTagAttributes.Target
msg.Parser.AHRefSuffix = "target=_blank"
' Also use MailBee.NET HTML to remove all unsafe stuff from the HTML body.
Dim htmlProcessor As Processor = New Processor()
htmlProcessor.Dom.OuterHtml = msg.BodyHtmlText
Dim rules As RuleSet = RuleSet.GetSafeHtmlRules()
Dim result As String = htmlProcessor.Dom.ProcessToString(rules, Nothing)
msg.Parser.CharsetMetaTagMode = CharsetMetaTagProcessing.RemoveCharsetMetaTag
msg.Parser.HtmlToSimpleHtmlMode = HtmlToSimpleHtmlAutoConvert.IfHtml
msg.Parser.PlainToHtmlMode = PlainToHtmlAutoConvert.IfNoHtml
msg.Parser.PlainToHtmlOptions = PlainToHtmlConvertOptions.UriToLink
Should I make any changes?
Thanks.
|
Back to Top |
|
|
Igor AfterLogic Support
Joined: 24 June 2008 Location: United States
Online Status: Offline Posts: 6104
|
Posted: 07 November 2012 at 1:04am | IP Logged
|
|
|
I'm not sure I understand the idea behind your question, what exactly do you call "the correct sequence"? We need to know what exactly you're trying to achieve. Also, I hope you understand: we can only point you to particular methods and properties, writing your code is your responsibility area.
--
Regards,
Igor, AfterLogic Support
|
Back to Top |
|
|