Customers frequently ask how to convert HTML email bodies to plain-text. You could simply strip out the HTML tags, but you’ll probably want to be a bit more sophisticated than that. What about scripts and style sheets? Also, BR tags should be converted to CRLF’s. Here’s an example that uses the Chilkat HTML-to-XML component as a helper to convert HTML to plain text (in C#). The equivalent code is available in all the other programming languages supported by Chilkat (C++, Java, Ruby, Perl, Python, ASP, VB6, Delphi, etc.)
https://www.example-code.com/csharp/emailObject_htmlToPlainText.asp