[Alpine-info] Re: display of html content
Joe(theWordy)Philbrook
jtwdyp at ttlc.net
Tue Nov 15 09:36:12 PST 2011
It would appear that on Nov 10, Mike Miller did say:
> The place where Alpine seems to fail is when the embedded
> graphics are attachments to the message. I don't see any easy way to view
> such messages in a browser. That's why I recommend switching to a different
> mailer for those occasional messages.
>
> No one has come up with another strategy for viewing those messages.
Well I'm not so sure I understand why this is so. I'm neither a programmer
nor an expert in the nuts n bolts of the email standards. But I have a
minimalistic understanding of some rather basic HTML, and I just spent
some time playing with just such an HTML email with attached images my sister
forwarded to me this Halloween. It had a jpeg image involving clothing stuffed
with pumpkins in such a way as to appear to be mooning the viewer. Another
with a big distorted smileyface saying "Nana - Nana - Nana" and a tiny
animated gif cartoon character that repetitively moons the viewer...
I don't know if all HTML mail that include images as attachments, identify
the image "src" in the HTML as "cid:${Content-ID}" (Where Content-ID
matches the the Content-ID: of the appropriate attachment. But if so,
how hard would it be to have an option when saving Text/HTML attachments to
file (similar to the export message: "^P" option that will include all parts)
that would in this case, modify the saved HTML by replacing the "cid:"
references with the associated filenames of the other attachments that would be
saved with the Text/HTML one??
I simulated this by exporting the message (with all parts) to an empty
directory, then using vim to edit the Text/HTML "part_2.1.2" in another window
while I examined the original message in header mode using the WhereIs
function to find the cid: references, and then via the clipboard I found
the associated filename in alpine and the "src=" reference in vim where I
replaced each one with the associated filename. Once I'd replaced all the
cid: references with the filenames I did a "ZZ" in vim and then typed:
"firefox part_2.1.2" at the command prompt which resulted in firefox
displaying the message exactly as my sister thought I could see it...
I have no idea how much interest there would be in such a patch, I do not
have the coding skill to write it. But it seems to me that the hardest part
would be to associate the values of the attachment Content-ID:'s with the
attachment names so that something like sed could be used to replace all
instances of "cid:${Content-ID}" in the freshly saved Text/HTML file with
the associated filename... I mean, the code to save all parts of the
message as separate files must already exist in the export message function.
I do know that I'd like to see it happen. (I'd use it every time some
family member sends me one of these.) But since I lack the skill to write
such a thing, it's just wishful thinking. (unless of course some real
programmer on this list likes the idea enough to play with it.) {sigh}
--
| ~^~ ~^~
| <*> <*> Joe (theWordy) Philbrook
| ^ J(tWdy)P
| \___/ <<jtwdyp at ttlc.net>>
But if I actually knew everything, then I'd know I was an idiot...
More information about the Alpine-info
mailing list