If a HTML will be sent via email, an alternative plain text has to be attached as well. (At least some spam detection software will check for a plain-text alternative) How am I able to convert a HTML to plain text?
HtmlDocument document = new HtmlDocument();
document.Load(htmlBody);
string plainBody = document.DocumentNode.InnerText;
Will return plain text, but all links will be lost.
E.g.:
HTML Version
<a href="#">Hello World</a>
should result in
Hello World (#)
But it results in
Hello World