How do I handle Microsoft outlook winmail.dat? Any

2020-07-10 06:43发布

Ive decided that I really dont like microsoft and their ways. Please could you give me directions on how to handle winmail.dat in emails, is there a jython library or a java library that will allow me to handle this.

Ive just completed a email processing program, written in jython 2.2.1 on java 5. During the final load test, I realised that attachments that should have been in a standard MIME email format is now tied up in some blasted winmail.dat, which means many different outlook clients pollute the internet with this winmail.dat, so that means i need to support winmail.dat. Thus my program failed to process the data correctly.

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

What other surprises can be expected!? what else do I have to watch out for, so far standard MIME emails are catered for. Are there any other jack in the boxes?

Thanks so much for your time.

7条回答
Melony?
2楼-- · 2020-07-10 06:45

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

kb138053

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

If you read the kb I referenced further it gives instructions on how Exchange administrators can and should disable RTF to the internet.

查看更多
Juvenile、少年°
3楼-- · 2020-07-10 06:49

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

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

查看更多
Animai°情兽
4楼-- · 2020-07-10 06:50

I have had good luck with wmdecode on Windows. Granted, it's an EXE, not a java project. But it could be useful if you run into WINMAIL.DAT files that other solutions can't decode.

查看更多
太酷不给撩
5楼-- · 2020-07-10 06:56

Just a comment about tinnef: Not everything that is called winmail.dat is ordinary TNEF. Meeting inviations sent from Outlook are not, thus most TNEF decoders will fail in this case.
On Mac OSX, I found "Letter Opener" to be one of the rare programs that can open such attachments. Funny enough, they can also contain rtf documents.

http://www.restoroot.org/LetterOpenerPro

查看更多
forever°为你锁心
6楼-- · 2020-07-10 06:58
萌系小妹纸
7楼-- · 2020-07-10 07:09

Topic closed, but for future purposes: Apache POI project (Java API for Microsoft Documents) is launching a version (3.8) that is capable to decode TNEF files. I tested it and worked very well, even the beta version. You can found it here.

To use with maven (june 2016 - might change later when it is no longer in the scratchpad):

    <dependency>
        <groupId>org.apache.poi</groupId>
        <artifactId>poi-scratchpad</artifactId>
        <version>3.14</version>
    </dependency>
查看更多
登录 后发表回答