Annoying winmail.dat attachments
Hmmm… it seems like Microsoft change the default settings for Outlook. At least I see the number of mails with those winmail.dat attachments increasing. “So what is it this winmail.dat thing? How come people telling me they cannot open my attachments?” Well, if you ask these questions you are probably a windows outlook user that is sending rich text mails to people that don’t use outlook. And you are probably not even aware of the crap that you are sending. Let me try to explain what is oing on.
Maybe lets take a step back on how email works. Email is an *old* standard in fact there was always just plain text getting transfered. Then people also wanted to send binary attachments. Hm – but we only have a plain text format? How do we do this without changing the standard? You have to encode the attachments. Simplified: you write a textual representation of byte instead of the byte itself into the mail. This is of course inherently more verbose. (This explains why you cannot send a 9MB mp3 file if your provider has a message size limit of 10MB. The encoded MP3 file will probably become more like 14MB when encoded in a mail) So something to remember: email is quite inefficient for file transfers.
Now we have another problem: how does the recipient distinguish between normal text and the encoded binary? You don’t want the recipient read that binary garbage but have him save the file. In the text mail there are markers that define the different parts of the mail. So a mail with an attachment actually looks like this
This is a multi-part message in MIME format. --------------030009080508060306080006 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Hey! Here is the image you wanted --------------030009080508060306080006 Content-Type: image/jpeg; name="image.jpg" Content-Transfer-Encoding: base64 Content-Disposition: inline; filename="image.jpg" /9j/4AAQSkZJRgABAQEAlgCWAAD/2wBDAAYEBQYFBAYGBQYHBwYIChAKCgkJChQODwwQFxQY GBcUFhYaHSUfGhsjHBYWICwgIyYnKSopGR8tMC0oMCUoKSj/2wBDAQcHBwoIChMKChMoGhYa KCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCj/wAAR ...
It’s just the email program that is aware of this format an decodes it for you. So you only see the message with an image attached. Now this has served many people well over the years until someone had the (great?) idea to send around rich text/html emails. So people finally can annoy you with their “perfect layout” of emails. They send you two parts. The plain mail for people who cannot render html in their email client (yes, there are people like that!) and the html version. Both as “attachments”. OK. So we have been living with this for a while. It only gets messy when you send a html mail that also comes with an image. (Like those people sending their company’s logo in every mail!) …so we just attach that image too. But as you can imagine this can become quite ugly when there are many images in the mail. So the obvious choice was to group them in a container first. The problem though is that Microsoft used a proprietary format for this container. So instead of just having a htmlpage.zip attached they attach a winmail.dat that includes the rich text representation of the mail. Well, even that would be OK as we would still have the plain text version and could ignore the winmail.dat. Now the real problem is that they also attach the other attachments into this container. So if someone wants to send e.g. a PDF and Outlook is set to send rich text emails it will end up inside this winmail.dat archive! As it is proprietary other email clients cannot see the attachment easily.
For OSX there is a program that can open winmail.dat attachments or you can get the plugin for Mail.app. Unfortunately at least “TNEF`s Enough” cannot open every attachment. The other option is to educate the people and blame Microsoft for this stupid stupid move.
Further details can be found here.