nmh-workers
[Top] [All Lists]

Re: [nmh-workers] Formatting HTML to Text: netrik.

2019-06-27 16:14:58
Hi,

Ronald F. Guilmette wrote:
Quite simply, all I would wish for would be something that would -properly-
convert -both- HTMLized emails -and- "Content-Transfer-Encoding: base64"
emails (like this one I'm responding to) into good old fashioned ascii,
at least for purposes of the "show" and "repl" commands.  I have my
jury-rigged solution working adequately well for the base64 encoding
still, but only for the "show" command, which means that I have to do
some manual cutting-and-pasting when/if I want to reply to a base64
encoded email. :-(

mhfixmsg does this pretty well I think, you just have to use it in
your procmail rules. It will convert the messages to plain ascii (from
base64) as well as convert html to text and add it as plain/text section
in the mime. I use the following:

mhfixmsg-format-text/html: charset="%{charset}"; /usr/bin/w3m -I ${charset} -T 
text/html -dump

This works in combination with replyfilter (a perl script distributed
with nmh or used to be) which nicely puts only the plain text section in
the reply for you (I am not sure if nmh would do this, I don't see why
not).

All these in combination you end with a reasonable reply to HTML emails.
The downside is that you don't get to keep the original email unless you
make a copy of it and it's fairly hacky.

Regards,
spaceman

-- 
nmh-workers
https://lists.nongnu.org/mailman/listinfo/nmh-workers

<Prev in Thread] Current Thread [Next in Thread>