Searching for examples of how to convert html to ascii for java multi-part emails
Posted on 2010-01-08
We use javamail and jakarta commons to send html email. However, a small number of users only support ascii email. I am seeking way to automate the need to send two formats of each email, html and ascii, rather than having to draft the content of each format manually.
are there any libraries or sample code that will convert a well structured html string into ascii? I have seen such examples in PHP but nothing in Java. Ideally, it would degrade gracefully, putting astericks in place of <strong>, convert tables (as best possible), safely handling long urls when ascii readers often break strings longer than 80 characters, to ascii-boxes, etc.