3

A friend forwarded a contact list to my gmail account from Outlook (2007 or 2010, not sure which). I can see there is an attachment in gmail but when I save it to my local drive it's just a plain text file containing the text This attachment is a MAPI 1.0 embedded message and is not supported by this mail system.

If I use gmail's "show original message" it contains in part:

This is a multipart message in MIME format.

------=_NextPart_000_0016_01CC6656.CE12F030
Content-Type: text/plain;
    charset="us-ascii"
Content-Transfer-Encoding: 7bit

------=_NextPart_000_0016_01CC6656.CE12F030
Content-Type: application/ms-tnef;
    name="winmail.dat"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
    filename="winmail.dat"

eJ8+Ih0VAQaQCAAEAAAAAAABAAEAAQeQBgAIAAAA5AQAAAAAAADoAAEIgAcAGAAAAElQTS5NaWNy
b3NvZnQgTWFpbC5Ob3RlADEIAQgABQAEAAAAAAAAAAAAAQkABAACAAAAAAAAAAEDkAYASAgAACgA

--8<---snip---8<--

GUC/9NKH95rABgMA/g8HAAAAAwANNP0/pQ4DAA80/T+lDvAm

------=_NextPart_000_0016_01CC6656.CE12F030--

How do I

  1. save the attached winmail.dat properly, and
  2. open the winmail.dat and extract the contact list?

I'm running Windows 7 x64, but have access to an ubuntu linux vmware appliance if needed. I have Outlook 2010, but can't use it to connect directly to gmail as pop3 and imap are blocked by the corporate firewall.

4
  • I may have accomplished #1 by dint of a) copying characters between filename="winmail.dat" and the trailing ------=_NextPart (but not including those bits) and pasting to b) webnet77.com/cgi-bin/helpers/base-64.pl, and c) saving the resulting binary file as winmail.dat. Sep 15, 2011 at 19:43
  • 1
    I've gotten partially through #2 by funneling the winmail.dat created above through Winmail Opener and saving the resulting "Untitled Attachment" to disk. I found winmail opener here (techhelp.santovec.us/decode.htm). The ms-tnef section on that page says "If the sender has included any attachments (e.g. pictures, spreadsheets, programs), they will be embedded within the TNEF attachment and not as separate attachments.". Sep 15, 2011 at 19:51
  • Looking at "Untitled Attachment" in a hex editor (Frhed) I can see that yes the contact list is actually embedded in the file. I found an address of my own (that isn't involved with this transaction), but padded with lots of other characters: [email protected]........+.......n....T..... Sep 15, 2011 at 19:59
  • the first bit of natural text in the "Untitled Attachment" is IPM.DistList, a little bit of searching for that confirms that I have an outlook distribution list, SO:what is in IMP.DistList. Sep 15, 2011 at 21:21

2 Answers 2

1

Solved! but talk about a circuituous route:

  1. in gmail, show original message
  2. save to disk (contacts-raw.txt)
  3. edit and put From [email protected] 29 Aug 2011 in first line (note absence of :), the date doesn't matter (ref)
  4. copy to linux machine and:
    1. process with formail to make it a proper mbox format (ref1, ref2)
      formail -ds <contacts-raw.txt >> contacts.mbox
    2. use mutt to bounce it to my work address (where I have Outlook 2010), use the b command for bounce (ref):
      mutt -f contacts.mbox
  5. When received in Outlook 2010 double-click on attached distribution list, save as .txt
  6. Replace embedded tabs with commas, rename contacts.csv, and now finally(!) use as originally intended.

Sheesh.


Postcript: I tried every single one of the windows and online applications listed on the Wikipedia page for the TNEF format and not one listed the distribution list buried in winmail.dat. I did find a program called WinDeveloper TNEF View which could at least see the entries, but it fared no better than a binary hexeditor like Frhed, and demanded an email (and 1 hour delay) to get a license key even for the trial.

As best I can determine the original list was sent to using the command "Forward as Outlook Contact" and considering that as I write this there are only 3 search results for that string I'd guess it's an under-utilized feature, and now I know why!

0

C/P of the windows support site

The Winmail.dat file is used to preserve formatting that the sending client includes in the message, but is not recognized by the receiving client. In the case of Outlook, the Winmail.dat file includes Rich Text Formatting (RTF) instructions. This type of formatting is used with the Microsoft Outlook Rich Text Format and when using Microsoft Word as an e-mail editor.

It's some kind of conversion that outlook makes to send attachments when its configured in Corporate/Workgroup (CW) mode instead the usual Internet Mail Only (IMO) mode. Maybe you could change it.

Anyway, there is an official guide to export contacts between outlook and gmail and it seems to be the only way to do this. You'll have to ask again to your friend and make the right process.

good luck!

3
  • Thank you, but I can't use the method described in the guide. It requires the originating user to Export the contacts to file and then send that. What happened in this case is the contacts were emailed directly. I'm trying to work with what I have now rather than ask my friend to go start over from the beginning (she's frustrated enough already). Sep 15, 2011 at 18:16
  • in any case, it seems that the winmail.dat file is not the atachment you're looking for. i'm updating the answer...
    – n00b
    Sep 15, 2011 at 18:48
  • thanks for the additional info. I've since managed to verify the info I need actually is in winmail.dat, though I've not yet managed to extract it in a usable form. (see comments on main Q). Sep 15, 2011 at 20:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .