Original MIME type set to plain in template when forwarding and both plain and HTML are available

After recent fixes my forward template can quote HTML emails (turn them into plain) thanks to .OriginalMIMEType made available in forward templates as well.

This does not seem to work though when both plain and HTML versions are considered by aerc as available. In that case, aerc sets the original MIME type to text/plain, despite the preference being set in alternatives to text/html.

This all works fine for reply template when the (preferred) text/html is set as the original MIME type.

Assigned to
3 years ago
3 years ago
No labels applied.

~kris 3 years ago*

Ah, after checking the code, I realised this does not work for replies either. It's just that some emails are considered by aerc to have both HTML and plain. In come cases, it's able to extract plain text from HTML without extra filtering and that is what it replies with or forwards. If the plain happens to be empty, then both reply and forward are empty.

So it works for both reply and forward only when aerc finds the email to have only HTML (no plain).

To summarise: MIME type is always set to plain text if both HTML and plain text is available, ignoring the alternatives configuration. If the plain happens to be empty (or a severly stripped HTML version), this becomes broken.

Register here or Log in to comment, or comment via email.