I have a shell script filter called "attach_view" that handles a number
of different attachment types, including HTML, PDF, Microsoft
documents and various images. I bind "|attach_view\n" to an
attachment key and can press it to see the selected attachment.
his works fine for me.
However, I'm getting HTML emails that have embedded images.
These come in as an HTML attachment, and a set of additional
image attachments which are often in random order. Is there a
method of being able to view the HTML with the attached images
as you can with most GUI email readers? Has anyone tackled
this very typical problem?
Thanks.
Short of writing a complex program that:
* creates a temporary directory
* filters the entire email, using munpack(1) to export all the image files
* extracts the HTML portion and then edits it to replace all <img> tags
with absolute paths to the actual image file
It's certainly doable, but I hope there is a tool that does this already! In my searching I haven't found any suitable tool.
* cjsmall on Monday, October 10, 2022:
Short of writing a complex program that:
* creates a temporary directory
* filters the entire email, using munpack(1) to export all the image files * extracts the HTML portion and then edits it to replace all <img> tags with absolute paths to the actual image file
It's certainly doable, but I hope there is a tool that does this already! Inshameless plug: viewhtmlmsg of
my searching I haven't found any suitable tool.
https://hg.phloxic.productions/muttils
does this.
Does not use munpack, I'm afraid, but python3.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 546 |
Nodes: | 16 (2 / 14) |
Uptime: | 08:37:09 |
Calls: | 10,388 |
Calls today: | 3 |
Files: | 14,061 |
Messages: | 6,416,833 |
Posted today: | 1 |