Thursday, April 24, 2008

TNEF Conversion

Have you ever gotten a winmail.dat file in Entourage or or even Thunderbird not to mention any other mail client?
So you are wondering how do I open winmail.dat on an Apple OS X machine
well here it is.

Not that I get them often, but ....
On the odd occasion i will get an email that is sent to me that has a winmail.dat attachment. This is a mail from Microsoft Outlook. Although there are ways of disabling the option to send TNEF (Transport Neutral Encapsulation Format) files. its generally easier to just convert the file yourself and leave the sender out of it.

There are a few ways of dealing with these pesky files.

1. you can download and use TNEF Enough.

2. you can use my script although there is more work involved its probably a little easier once setup. (OSX Tiger Needed)

The Requirements.
1. OSX Tiger or above with Apple Developer Tools Installed.
2. Automator
3. Darwin Ports installed
4. Install TNEF
5. Download my winmail script.

The How To:
1. Installing XCode Tools.
If you already have the Apple Developer tools installed then skip to the next section

if not, you can either install in from your Tiger or Leopard Install DVD, if you don't have it handy you can get it from the Apple Developer site

2. Installing Darwin Ports.
go here for Darwin Ports or here for Macports to download the DMG file.
Install the ports system and then in your (in the Utilities Folder) type in the following

sudo port -d selfupdate

you might not need to do an update but it is recommended

then in your window type the following
% sudo port install tnef

you will be prompted for your password.

then you will see something like this
---> Fetching tnef
---> Verifying checksum for tnef
---> Extracting tnef
---> Configuring tnef
---> Building tnef with target all

---> Staging tnef into destroot

---> Installing tnef

Once that is done you have TNEF installed.

Download the file

the winmail app should be pretty generic, and should not need to be changed at all, butyou are more than welcome to open it in automator and edit it as you need.

Basically what it does is finds the winmail.dat file on your desktop.
then extracts the contents and moves it to a TNEF folder in your Documents folder the script will create the TNEF Folder
After that it opens the folder so you can see the contents and deletes the original winmail.dat file from your desktop

What I have done is added the winmail app into my Dock, so when a mail arrives with a winmail.dat attachment all I do is save it to my desktop and click on the Winmail application icon on my Dock.
If all works well you are presented with a finder window with the contents of the winmail.dat file.

No comments:

Joe's Store