Author |
|
caussin Newbie
Joined: 06 January 2009 Location: France
Online Status: Offline Posts: 6
|
Posted: 06 January 2009 at 3:44am | IP Logged
|
|
|
I am reading a text message (no HTML at all).
i have set these two options :
Msg.Parser.PlainToHtmlMode = PlainToHtmlAutoConvert.IfNoHtml
Msg.Parser.PlainToHtmlOptions = PlainToHtmlConvertOptions.UriToLink
then i check msg.BodyPlainText ==> not empty
and msg.BodyHtmlText ==> empty
the conversion from plain to html did not work. Do you have any idea of why ?
(Then, what i had done to bypass is to use the bodyplaintext and replace linefeeds with <br/>... and i was about to process myself the url identification and conversion to <a..>. Do you have any object/class/method that can be called within MailBee.NET objects to send a string and return a html string with linefeed replaced by <br/> and http links replaced to <a> ?
Thanks in advance.
Olivier
|
Back to Top |
|
|
Alex AfterLogic Support
Joined: 19 November 2003
Online Status: Offline Posts: 2206
|
Posted: 06 January 2009 at 8:17am | IP Logged
|
|
|
Quote:
the conversion from plain to html did not work. Do you have any idea of why ? |
|
|
You may have specified these settings too late when the message has already been parsed (access to any property/method which requires parsed message makes the message get parsed if it hasn't already been).
You should set these properties just after you received the message. Alternatively, if you need to apply them AFTER the message has already been parsed (i.e. when you decide that you need to set these values by analyzing certain properties of the parsed message), you can call msg.Parser.Apply.
Quote:
return a html string with linefeed replaced by <br/> and http links replaced to <a> |
|
|
I hope the advice above should help.
Regards,
Alex
|
Back to Top |
|
|
caussin Newbie
Joined: 06 January 2009 Location: France
Online Status: Offline Posts: 6
|
Posted: 07 January 2009 at 4:51am | IP Logged
|
|
|
thanks for your reply. You were right. Now works perfectly.
happy olivier
|
Back to Top |
|
|