Exchange users with new iPhones are re-discovering an old bug where messages sent through ActiveSync for mobile devices do not appear properly in both Entourage 2004 and Entourage 2008. The messages sometimes look like a mix of HTML, E-mail headers and what’s left of the original message or they look like an unintelligible jumble of letters and numbers. The recipient and the subject are also empty.
This problem was addressed in the knowledgebase article “The header information is not displayed in Entourage 2004 for an e-mail message that is sent by using Exchange ActiveSync”. However, the workaround mentioned in the article, which is to view the message in Outlook Web Access (OWA), does not work in either the full version that Internet Explorer for Windows users would see or the light version that Mac users would see.
What’s happening and how can you read these “corrupt” messages?
Who’s the culprit?
Exchange users assume this must be a bug in both Entourage 2004 and Entourage 2008 because they do not see this problem in Outlook for Windows. However, if they also try to view the files in OWA they will find the messages missing altogether.
What do Entourage and OWA have in common? They both connect to Exchange via WebDAV. So, this problem isn’t necessarily a bug in Entourage. In fact, it’s a bug in ActiveSync for Exchange. ActiveySync is the Microsoft technology that allows mobile devices such as Windows Mobile phones and the iPhone connect to Exchange. Furthermore, it’s specifically a bug in ActiveSync for Exchange Server 2003. Entourage users connecting to Exchange Server 2007 servers should not see this problem.
What causes the problem?
So, what is ActiveSync doing to mail messages as they pass through it and why doesn’t Outlook or any other E-mail client have this problem?
ActiveSync is munging the headers of the mail messages. Notice in the earlier screenshot that the mail message includes X-MimeOLE, Received, MIME-Version and other lines of information you normally wouldn’t see. These are the headers, or the envelope of your mail message. They are suppose to be in a specific format so that mail applications can translate them and make the message presentable.
But look at what ActiveSync is doing to the message you send. The headers are appearing in the body of the message, which is not normal:
If you look at the source, or the full message with headers and body combined, by selecting Source from the Message menu (select Source from the View menu in Entourage 2004), you’ll see it is identical to the body of the message except for two (sometimes more) additional headers at the top:
Technically, a mail message header is a sequence of non-empty lines at the beginning of the mail message. But if we are to believe that with this example message then the entire header would simply be the first two lines because they are followed by an empty line:
MAIL FROM: <William.Smith@domain.com>
RCPT TO: <email@example.com>
ActiveSync is appending these bogus headers and causing the real headers to fall into the body of the message. But why isn’t Outlook for Windows susceptible to this problem? Most likely it has simply been programmed to realize these two headers are bogus and to continue reading the rest of the headers properly.
Are the messages still readable?
Yes! We simply need to remove the bogus headers and then view the messages in their correct format. To say that these messages are “corrupt” is a misnomer. They are not irreparably damaged. They can be properly viewed with the help of AppleScript. I’ve written a script to do just that.
Download the script and follow the instructions to install it into the Entourage Script Menu Items folder in your Microsoft User Data folder. Once installed it will be immediately available in the Script menu in Entourage.
To use the script simply select the unreadable message in the message list, or open it, and then select the Read ActiveSync Sent Item script from the Script menu. If the script detects the message has the improper headers then it will open the message in a new window and it should be readable. So the example message above should now display as:
The new message is not really in Entourage but just a temporary file. If you wish to save it to your Desktop then you’ll have that option:
The new message file will be saved with the Subject as its name.
Due to limits with Entourage’s AppleScript capabilities, the message cannot be automatically saved back into Entourage. You can, however, drag and drop the message into the original folder and delete the old message. Sent date and time will be preserved so the message will properly sort within the message list. Only one message can be read and saved at a time.
[Note: The download file contains an Example.eml file, which I used for the examples in this post. I’ve included it for anyone interested in examining this problem in detail.
Special thanks to Jon Connell in the Microsoft Entourage newsgroup for his insight that this problem could possibly be solved with AppleScript!]