Closed hgvhgv closed 1 year ago
Bower is sticking strictly to the tree structure, which is:
multipart/alternative
├─ text/plain
└─ multipart/mixed
├─ text/html
└─ application/pdf
If the alternative is a mixed part with attachments, we could hint "z for alternative (n attachments)" or something.
Or, as you say, we could collect up the attachments from the mixed part and show them under the text/plain part as well. I think (commercial) messages might like to include logos and other useless images referenced from the html part, that aren't particularly interesting. Maybe we could ignore parts with "Content-Disposition: inline" as not being "attachments" for this purpose.
Right, makes sense, thanks for clarification. Very annoying of Apple Mail.
Your first suggestion would be a great help, though of course the second would be even more helpful (though, as you can see, Apple Mail at least labeled the attachment here as inline). As I keep learning Mercury, I'll see if I can get the second idea working.
I've added the hint.
I received an email from a friend that had a number of attachments but bower only displayed the text/plain portion, hiding the relevant attachments. I think this happened because the first part was text/plain while the remainder (including the attachments) was within a multipart/mixed part. It was from Apple Mail, and IIRC, I've read a number of reports of Apple Mail emails being somewhat poorly formatted (see https://nmbug.notmuchmail.org/nmweb/show/87ty7tr1q8.fsf%40servo.factory.finestructure.net). But bower would still ideally indicate that it's not just an alternative that is hidden but has other relevant parts.
Notmuch emacs shows by default that there is a hidden multipart/mixed part. Alot has a cool feature where attachment parts are identified and listed right beneath the email header info, so it pulls the attachments out here (this would be an alternate solution but require identifying attachment parts and displaying them differently).
I dummied up a version of the email with an empty PDF attached and some info snipped, which has the same issue.