Read Mail shows empty content with option "Always plain text"

I have a Usermin user reporting some incoming emails showing empty bodies. After analysing the problematic emails I realised that they only had:

Content-Type: text/html;

The Usermin "Read Mail" module is configured for "Show message body as: Always plain text" ($userconfig{'view_html'} == 0).

When these emails are rendered their bodies are empty - not something the user will understand, and not something an administrator would quickly associate with the setting.

It seems to me that in this situation, where there is an HTML body, the code should do something similar to option 3 (convert from HTML to text).



I've posted proposed patches to the "issue_19967" branches of my github forks of webmin and usermin. As "" is part of webmin the complete fix spans both projects.

I'll issue pull requests directly from github.

Thanks .. I've posted some comments on your commits.

It seems that you can get the effect you want by setting "Show message body as" to "Convert HTML to plain text".