Back to Tutorials list
Display HTML/Plain Text Message In Desktop Application
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.
[C#]
msg.Parser.HtmlToPlainMode = HtmlToPlainAutoConvert.IfNoPlain;
[VB.NET]
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):
[C#]
textBox1.Text += msg.BodyPlainText;
[VB.NET]
textBox1.Text += msg.BodyPlainText
Back to Tutorials list