Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Text attachments appear as message body in some mail clients #655

Open
tlconnor opened this Issue · 1 comment

2 participants

@tlconnor

The default part sort order is [ "text/plain", "text/enriched", "text/html" ]. If a multipart email contains text and html parts as well as a text attachment, the text attachment will often appear before the text body in the message.

In some mail clients this results in the attachment being treated as the message body.

I'm not sure if this is something that should be fixed, but if it is, a simple solution would be to look for content-disposition=attachment when sorting parts.

I can send a pull request if this seems like a legitimate bug.

@npickens

This is technically a problem with the email client, since it is ignoring "Content-Disposition: attachment". That being said, I think it should be worked around on this side of things. Outlook 2013 will just hide a plain-text attachment if it comes before the html version of the message body because it assumes the attachment is the plain-text version of the message body. Moving the plain-text attachment after the html message body causes it to be interpreted correctly as an attachment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.