Search The ForumSearch   RegisterRegister  LoginLogin

MailBee.NET POP3

 AfterLogic Forum : MailBee.NET POP3
Subject Topic: conversion Plain to HTML does not work Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
caussin
Newbie
Newbie


Joined: 06 January 2009
Location: France
Online Status: Offline
Posts: 6
Posted: 06 January 2009 at 3:44am | IP Logged Quote caussin

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 View caussin's Profile Search for other posts by caussin
 
Alex
AfterLogic Support
AfterLogic Support
Avatar

Joined: 19 November 2003
Online Status: Offline
Posts: 2206
Posted: 06 January 2009 at 8:17am | IP Logged Quote Alex

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 View Alex's Profile Search for other posts by Alex
 
caussin
Newbie
Newbie


Joined: 06 January 2009
Location: France
Online Status: Offline
Posts: 6
Posted: 07 January 2009 at 4:51am | IP Logged Quote caussin

thanks for your reply. You were right. Now works perfectly.
happy olivier
Back to Top View caussin's Profile Search for other posts by caussin
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump

Powered by Web Wiz Forums version 7.9
Copyright ©2001-2004 Web Wiz Guide