I'm looking for code or a library in C# that convert HTML email format to plain text format. I want to send my emails with both format. Also, I would like the href links to be converted to text as well. Exactly how mailchimp does it here: https://templates.mailchimp.com/resources/html-to-text/ Any idea?
Asked
Active
Viewed 4,209 times
0
-
You can strip tags from the string, as described here: http://stackoverflow.com/questions/286813/how-do-you-convert-html-to-plain-text – shlatchz Mar 04 '17 at 15:00
1 Answers
1
You can use HtmlAgilityPack and loop through nodes to extract text. Example: Grab all text from html with Html Agility Pack