Yet more reason to hate MS Exchange. Here are the relevant headers and MIME lines from a meeting notification I got recently:
Subject: XXX Staff Meeting Content-Type: multipart/alternative; boundary="_000_A32122FBAE23C145ABBEFDEA852187CE01E77A1505B7BLADEBLA03V_" MIME-Version: 1.0
--_000_A32122FBAE23C145ABBEFDEA852187CE01E77A1505B7BLADEBLA03V_ Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 … --_000_A32122FBAE23C145ABBEFDEA852187CE01E77A1505B7BLADEBLA03V_ Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: base64 … --_000_A32122FBAE23C145ABBEFDEA852187CE01E77A1505B7BLADEBLA03V_ Content-Type: text/calendar; charset="utf-8"; method=REQUEST Content-Transfer-Encoding: base64 … --_000_A32122FBAE23C145ABBEFDEA852187CE01E77A1505B7BLADEBLA03V_--
At first glance, all might look normal: there’s a calendar entry with a note attached.
So first we have the plain text version of the note, followed by the HTML version of the note, followed by the vCalendar file describing the meeting itself.
But a closer look at the header shows that the message as a whole has Content-Type: multipart/alternative.
RFC 1521 says:
The multipart/alternative type is syntactically identical to multipart/mixed, but the semantics are different. In particular, each of the parts is an “alternative” version of the same information.
Systems should recognize that the content of the various parts are interchangeable. Systems should choose the “best” type based on the local environment and preferences, in some cases even through user interaction.
In other words, any standards-compliant mail reader should see those three MIME chunks as three different versions of the same information. So if it decides to (or you tell it to) display the HTML version of the note, it shouldn’t display the calendar file. And if it displays the calendar entry, it shouldn’t show the attached note.
Clearly somebody at Microsoft needs to be slapped. Hard.
(And in case you’re wondering, the proper way to do what they’re trying to do would be for the message as a whole to be multipart/mixed with a multipart/alternative chunk for the note, and a text/calendar chunk for the calendar entry. The note chunk would be further subdivided into a text/plain chunk and a text/html chunk.)
I think that when people are first told that Exchange is both a mail server and a calendar server, they think it’s kind of like a goose — something that can competently walk, swim, and fly, even though it may not excel at any of those — but in reality, it’s more like a crocoduck: massive fail at every level, no matter how you look at it.