<<< Date Index >>>     <<< Thread Index >>>

Re: multipart/alternative question



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

On Wednesday, July 15 at 11:02 PM, quoth Tim Gray:
> I have my alternative_order set to text/plain text/html.

So do I.

> However I have some people who use a mailer (Apple Mail) that send 
> multipart/alternative messages with attachments.

How bizarre.

> Since mutt is set to prefer text/plain, all I see is the plain text 
> message, with no indication that there is an attachment (or even an 
> html part).

First, of course there's no obvious indication that there's an html 
part. Why should there be? Unless you press v to view the MIME 
hierarchy of the message, mutt doesn't tell you about alternative 
components to your email.

As for an indication that there is an attachment... what do you mean 
by "indication"? Do you mean some sort of inline thing like mutt does 
for more usefully structured emails? Because you CAN put %X in your 
$pager_format string to let you know how many attachments there are in 
the current email.

> I don't know if this is normal behavior for multipart/alternative 
> messages with attachments, or a quirk of Apple Mail.

It's a quirk of Apple Mail.

The thing is that Apple realized that the concept of an "attachment" 
is somewhat artificial, given how MIME works. So they started building 
messages as multipart/alternative where you could put "attachments" in 
the middle of text blocks. And when they send a TEXT message, this 
works just fine. However, from what I can tell, when someone composes 
an HTML message, Apple Mail falls down on the conversion job, and 
rather than maintain the original (for example, 
htmlpart-filepart-htmlpart) structure, it simply glues the html parts 
together, and builds a single alternative text version of the whole 
message. It's technically correct, but not especially useful.

> I would have thought that the text/plain and text/html part of the 
> messages should make up the multi/alt part, with other file 
> attachments living at the same level as the multi/alt part, not 
> buried in *one* of the alternative components

If they did that, mutt would certainly be happier, yes.

> So, what is the best way to deal with this?  Is there anyway to just 
> prefer the text/plain but look for attachments in the text/html 
> branch?  Or have an indication that there is a text/html branch 
> onscreen so I know to look there?  Or is the only route to set my 
> alternative_order to prefer text/html first...

It depends on what you're going for. I recommend an attachment counter 
in $pager_format.

~Kyle
- -- 
Whenever you have an efficient government, you have a dictatorship.
      -- Harry Truman, lecturing at Columbia University, April 28, 1959
-----BEGIN PGP SIGNATURE-----
Comment: Thank you for using encryption!

iQIcBAEBCAAGBQJKXzMkAAoJECuveozR/AWetyYP/3Jq3FGE9iFngrKqteXBwvfD
pjoW1Qxt39Ncer26d7CPLu9R37A/HEcX1ClZqF2467EyZgYgqcjHhdcSUG5vTNPJ
IK34TgCWX35zxIP4J78MKXVldP0xjtnl/jcTZiXZ8B98T402nWFLn6Ik3q3Y9q7l
9SOGyQRE0PiWwWDjtwsnMNz1CZ3qicR/S/KcA6BXGRIbSpk7TLl5XofbH5Mkm24b
qUT3LtV1Oq7cTdBo0WCrHE8GDmsYU/s2m+4PA93AKPN7r1CTwK23xKaFcsYE/NfH
/wMsKAkgj+lfXXNZShnBCaP6ID0UQ9xF2UCxdQIBBoxqbZtQntg3o4YH+WlK6Ev1
85t7tLwoTMMxWx1r81pqKVyCNAxZGTlH5AYOnY3p0HJVFPDIAEDlwHQT6flJAJ8O
tcLODohXLuaP1Twna99DSShpc+QSJef6ZXa7V5U5sqVIC5I82Yiz/FEnVfsWBmtC
8BTqawNCpnun/Ij+dpGVmHjg2uOsaKL20fm1jXH529pplPgYxKReUW2Eb1zbm0yM
NV9xg3PgQe850/DVM6KGwuLuFXL7D3n3Fr56jUw5DMiqGeorw9HbNRJHFfPg1ZI4
0N7ABCSkjfHC8n/KM54R/zENNp59MrAKFxyr7Tbv9Ih5pnz6lr3XmXLpEbNQA93+
8CdRuN0OKg4Ugsm+BmW7
=7eHI
-----END PGP SIGNATURE-----