How to handle the appearance of Microsoft winmail.dat? Any other surprises?

Ive decided that I really do not like Microsoft and their methods. Please, could you give me instructions on how to handle winmail.dat in letters, is there a jython library or a java library that will allow me to handle this.

Ive just completed an email processing program written in jython 2.2.1 in Java 5. During the final download test, I realized that the attachments, which should have been in the standard MIME email format, are now associated with some kind of hacked winmail. dat, which means that many different Outlook clients infect the Internet with this winmail.dat, so I need to support winmail.dat. Thus, my program was not able to process the data correctly.

Please, could you give a brief description of what winmail.dat is and why it is here to annoy us.

What other surprises can you expect !? what else should i observe, still standard MIME emails are satisfied. Is there any other connector in the box?

Thanks so much for your time.

+7
java python email jython
source share
7 answers
+6
source share

The topic is closed, but for future purposes: The Apache POI project (Java API for Microsoft Documents) launches version (3.8), which is capable of decoding TNEF files. I tested it and worked very well, even in beta. You can find it here .

For use with maven (June 2016 - may change later when it is no longer on notepad):

<dependency> <groupId>org.apache.poi</groupId> <artifactId>poi-scratchpad</artifactId> <version>3.14</version> </dependency> 
+5
source share

Please, could you give a short description of what winmail.dat is and why it is here to annoy us.

kb138053

When the end user sends mail to the Internet from Exchange Windows or the Outlook Client, the attachment of the Winmail.dat file can be automatically added to the end of the message if the receiving client cannot receive messages in Rich Text Format (RTF). The Winmail.dat file contains the RTF Exchange Server information for the message, and may appear to the recipient as a binary file. This is not useful for non-Exchange server recipients.

If you read kb, which I refer to, it gives instructions on how Exchange administrators can and should disable RTF on the Internet.

+3
source share

so when i see this email Content-Type: "application / ms-tnef"

I use this: http://www.freeutils.net/source/jtnef/

+1
source share

I got lucky with wmdecode on Windows. Of course, this is an EXE, not a java project. But this can be useful if you run WINMAIL.DAT files that other solutions cannot decode.

0
source share

Just a comment about tinnef: Not everything called winmail.dat is regular TNEF. There is no meeting call sent from Outlook, so most TNEF decoders will not work in this case.
On Mac OSX, I found that the "Letter Openener" is one of the rare programs that can open such attachments. Funny, they can also contain rtf documents.

http://www.restoroot.org/LetterOpenerPro

0
source share

There is also a python tnefparse package there . It should be possible to use this from Jython.

0
source share

All Articles