Sunday, January 21, 2001
The Pocket PC email syncing problem
Posted by Jason Dunn in "THOUGHT" @ 08:47 PM
Before Pocket PCs debuted in April 2000, Microsoft pointed out that their new pda platform would support syncing with html emails, something Windows CE 2.11 had neglected to do. However, maybe you noticed that this works only some of the time. The fine folks at PocketPC.com have noticed this too. After writing an article titled HTML E-mail Syncs Up Now -- Cool!, Jason Dunn added an update mentioning the problem and asked the proverbial question, why? He even mentions that if an html email won't sync, you can forward it to yourself in Outlook and it will. This got me to thinking ¾ what does Outlook do to an html email that other programs might not? I had a suspicion and after a little testing, I found my answer in the content type of the email.
So what is a content type? Well, the content type is an email header than defines how the email is formatted. There are many content types (undoubtedly more than I can recall from memory), but I'll give a good overview of the basics.
Perhaps the most common content type is text/plain. You guessed it ¾ simple plain text emails have a content type of text/plain. Two other common content types that are used to send html emails are text/html and text/enriched. Then somebody had a great idea of combining the two. What if you could send an html message, but have older email clients that didn't support html read a plain text version of that message? There are two content types that do just this: multipart/alternative and mulitpart/related. In these types, both the html and the plain text copy of the message are included in one email. Then, if an email client can display the html, it does. If that client can only display text, it ignores the html portion of the email and displays the text.
So how in the world does all this boring talk of content type fit in with the PocketPC? Well, it turns out that Pocket PCs can only sync html emails if they're content type is multipart/alternative or multipart/related. What ActiveSync is actually doing is taking the text portion of the email and syncing that over to the pda. Emails with a content type of text/html or text/enriched come across as blank messages.
Outlook uses mulitpart/alternative when it sends out html email. (The only time I've observed it to use mulitpart/related is when it sends out an html email with a background image). This is why forwarding yourself a straight html message causes it to then sync with your PocketPC. Upon forwarding, Outlook takes your html message and converts its content type into mulitpart/alternative, so that it now syncs properly.
So how do you tell what content type an email is? Well if you're using Outlook, open up an email you've received. Be sure to open the email message itself, so that it is in its own window, not merely inside of the preview pane. Then, go to the View menu and choose Options. When the options window comes up, look in the text area box that's labelled Internet Headers. You may need to scroll down, but here you'll find the Content Type.
In a perfect world, Microsoft would not have made their html syncing rely on an email's content type. Hopefully, Pocket PC users will see this fixed in a future release of ActiveSync. Until then, at least we've learned how it works.
So what is a content type? Well, the content type is an email header than defines how the email is formatted. There are many content types (undoubtedly more than I can recall from memory), but I'll give a good overview of the basics.
Perhaps the most common content type is text/plain. You guessed it ¾ simple plain text emails have a content type of text/plain. Two other common content types that are used to send html emails are text/html and text/enriched. Then somebody had a great idea of combining the two. What if you could send an html message, but have older email clients that didn't support html read a plain text version of that message? There are two content types that do just this: multipart/alternative and mulitpart/related. In these types, both the html and the plain text copy of the message are included in one email. Then, if an email client can display the html, it does. If that client can only display text, it ignores the html portion of the email and displays the text.
So how in the world does all this boring talk of content type fit in with the PocketPC? Well, it turns out that Pocket PCs can only sync html emails if they're content type is multipart/alternative or multipart/related. What ActiveSync is actually doing is taking the text portion of the email and syncing that over to the pda. Emails with a content type of text/html or text/enriched come across as blank messages.
Outlook uses mulitpart/alternative when it sends out html email. (The only time I've observed it to use mulitpart/related is when it sends out an html email with a background image). This is why forwarding yourself a straight html message causes it to then sync with your PocketPC. Upon forwarding, Outlook takes your html message and converts its content type into mulitpart/alternative, so that it now syncs properly.
So how do you tell what content type an email is? Well if you're using Outlook, open up an email you've received. Be sure to open the email message itself, so that it is in its own window, not merely inside of the preview pane. Then, go to the View menu and choose Options. When the options window comes up, look in the text area box that's labelled Internet Headers. You may need to scroll down, but here you'll find the Content Type.
In a perfect world, Microsoft would not have made their html syncing rely on an email's content type. Hopefully, Pocket PC users will see this fixed in a future release of ActiveSync. Until then, at least we've learned how it works.