Display HTML/plain text message in desktop application (MailBee.NET Objects Tutorials)

From AfterLogic Wiki

Jump to: navigation, search

If you need to display the HTML message in plain-text control (like Memo) in the desktop application, you should convert HTML text body into plain-text.

msg.Parser.HtmlToPlainMode = HtmlToPlainAutoConvert.IfNoPlain;
msg.Parser.HtmlToPlainMode = HtmlToPlainAutoConvert.IfNoPlain

The code above converts the message to plain-text if it does not already have the plain-text body. You can then display plain-text body as below (assuming textBox1 is a text control on the form):

textBox1.Text += msg.BodyPlainText;
textBox1.Text += msg.BodyPlainText