Snow Leopard Mail.app and multi-part MIME

Here’s an executive summary of the way Apple handles multi-part messages in Snow Leopard’s Mail.app.

doingitwrong1 Here’s the problem. Say that you use Mail.app to compose a message that has some text, then an inline image (or PDF; doesn’t matter), then some more text. What you’d probably expect is that it would display properly in Outlook, OWA, and other non-Apple mail clients. What you get instead is rubbish.

It turns out there are two ways to construct a MIME message with multiple parts, and at least two ways to put them back together again. Exchange and Outlook use one method: the messages they generate are tagged as MIME multipart/related, and inline attachments are referenced as separate parts. The body text for the entire message is one contiguous block, with "cid:XXXX" references to the inline items. Outlook or OWA are responsible for rendering the inline images.

Apple Mail uses the other method: inline attachments are tagged with "content-disposition:inline". Any blocks of content after an inline attachment are created as separate message parts. The client is responsible not only for rendering the inline images, but also with taking any additional attachments and putting them inline.

What does that actually mean? Say you compose a message. The image on the right show what it looks like when you send it. The image on the left shows what it looks like to the recipient. You’ll have to click on the thumbnails to get the full versions, but you can see what I’m talking about: the Outlook user gets no cheese, no lolcat, and no text below the picture—at least not without clicking on them.

MailScreenSnapz001 bad-apple

Now, perhaps I’m being too harsh by saying that Apple’s doing it "wrong". I mean, can’t we all just get along?

In this case, no, Apple is doing it wrong. One of the major features in Snow Leopard Mail was supposed to be Exchange compatibility. If you produce messages that Exchange clients can’t read, well, that’s not very compatible, now is it? There are tons of complaints about this on Apple’s discussion forums, mostly centering around Mail’s inability to read voice mail messages from Vonage– so it’s not just Exchange users who are being bitten by this.

For another day: how I used the ever-useful pickup directory to figure out exactly what the problem was.

Advertisements

7 Comments

Filed under UC&C

7 responses to “Snow Leopard Mail.app and multi-part MIME

  1. What’s the point of using this app if it is rubbish. I see what you mean in the image above.

  2. So, the plot thickens. Take a look at KB 814111, in which it is explained that Outlook *by design* does not honor the Content-Disposition header. The “More Information” section explains that it’s an optional field (which might explain why Outlook and OWA don’t honor it) but then goes on to explain why this is a useful feature.
    I’m curious why Outlook still doesn’t honor Content-Disposition when it seems that the rest of the world thinks it makes sense for MIME mail messages. Without knowing why Microsoft made that choice, it’s hard to tell who is really at fault.

  3. Does Mail.app render MIME multipart/related messages sent from Outlook correctly?

  4. I don’t know ATM; I left my Mac at home today. I’ll send a test message to a couple of my Mac users at work and report back.

  5. Interestingly, I sent a similar multi-part message from Outlook 2010 through Exchange 2010, and Snow Leopard rendered it properly. Perhaps Apple’s not as much at fault as I first thought.

  6. Jc

    Has anyone found any workaround to this problem?
    Is there anyway that you can format the message so Outlook renders it correctly?

  7. Caleb Land

    In Mail.app, in the main mail window, go to View->Attachments and select “Always Insert Attachments at End of Message”
    That should clear this up, I think…