PHP Classes

Problem with Outlook msg file - binary not decoded

Recommend this page to a friend!

      PHP MIME Email Message Parser  >  All threads  >  Problem with Outlook msg file -...  >  (Un) Subscribe thread alerts  
Subject:Problem with Outlook msg file -...
Summary:Issues found when trying to parse locally saved outlook emails
Messages:8
Author:Robert Jinksamona
Date:2008-11-19 17:21:30
Update:2009-10-30 06:27:28
 

  1. Problem with Outlook msg file -...   Reply   Report abuse  
Picture of Robert Jinksamona Robert Jinksamona - 2008-11-19 17:21:30
Manuel,
Greetings, and thanks for sharing this project. I am trying to parse emails copied from MSOutlook client, saved in the .msg format. There is quite a bit of binary info in the file, and I am having some trouble. Perhaps I am missing some options or other, but it does not appear to be parsing the message correctly. It does not recognize the attachments, and it includes all of the binary data in the output. I am wondering if there is a new content-type supplied by the .msg file that is not recognized by your parser??

The message content-type (with binary chars eliminated) looks something like this:

"Content-Type" CONTENT="text/_substg1.0_1035001

and continues on. It also presents several errors at the end, such as:
Warning: invalid header name line at position 0 Warning: invalid header name line at position 1061 ...


Any help would be appreciated. Thanks!


r.b.


  2. Re: Problem with Outlook msg file -...   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2008-11-19 18:22:47 - In reply to message 1 from Robert Jinksamona
I tried the message sample that you sent me but it has no content-type headers like you mentioned. Are you sure you sent me the right example?

  3. Re: Problem with Outlook msg file -...   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2008-11-19 18:29:09 - In reply to message 1 from Robert Jinksamona
Maybe the message got filtered. You may want to try to pack files with ZIP before sending them to me.

  4. Re: Problem with Outlook msg file -...   Reply   Report abuse  
Picture of Walter Craft Walter Craft - 2009-06-24 17:59:55 - In reply to message 1 from Robert Jinksamona
I have the exact same problem. Is there any new information regarding parsing outlook messages?

  5. Re: Problem with Outlook msg file -...   Reply   Report abuse  
Picture of ding ding - 2009-10-29 07:43:05 - In reply to message 4 from Walter Craft
I'm having this same issue too.

  6. Re: Problem with Outlook msg file -...   Reply   Report abuse  
Picture of Robert Jinksamona Robert Jinksamona - 2009-10-29 12:42:05 - In reply to message 5 from ding
The route I took was to create a macro in my outlook that went through all of the messages, extracted their attachments and saved them into a directory. Then I went and processed the final product. Not really a very elegant workaround.

  7. Re: Problem with Outlook msg file -...   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2009-10-29 17:37:15 - In reply to message 5 from ding
You probably want to process Outlook DBX message files, which is a different format than EML.

In that case you may want to try this other class to convert messages between formats.

phpclasses.org/dbxparser

  8. Re: Problem with Outlook msg file -...   Reply   Report abuse  
Picture of ding ding - 2009-10-30 06:27:28 - In reply to message 7 from Manuel Lemos
Thanks for your reply. I tried to use that parser btw, but it said that my message is not in dbx format, any idea why is that?

I'm using Outlook 2003, and the procedure that I used in testing that parser was this:

1.) Drag message from Outlook 2003 to desktop.
- Creates a .msg file

2.) Then I uploaded this .msg to my php script, and loaded it with that parser.
- Parser said that the file is not a DBX format.