In "Using Windows Mobile 2003 to Access Exchange," March 2004, InstantDoc ID 41347, I discuss how Windows Mobile 2003's capabilities let you securely access Exchange Server 2003 over a wireless connection. I talk about the two ways you can access mailboxes: by using IMAP and by using the server-based Microsoft ActiveSync. You might be trying to decide which protocol is better for your organization. To help you make an informed decision, let's look at how each protocol lets you access your mail and calendar data and how the two protocols differ in regard to network utilization.

Got Mail?
Windows Mobile 2003 implements Microsoft Pocket Outlook, which lets you access Exchange 2003 data. Pocket Outlook consists of three components: transport protocols, a UI, and a message store. IMAP and ActiveSync are transport protocols that perform retrieval operations (e.g., download messages from the server to handheld devices). These protocols also perform server-side mailbox management operations, such as deleting and moving messages. The UI provides features that let you interact with the message store (which stores Pocket Outlook data) so that you can read, compose, move, and delete messages.

Because the Pocket Outlook model is segmented, you perform a task (e.g., composing a message) the same way, no matter whether Pocket Outlook is using IMAP or ActiveSync. Differences between the two protocols emerge when you examine how they translate client-side actions into server-side operations and when you define the parameters that control how the protocols perform message retrieval and management operations.

Both protocols provide options that let you control how much of a message is retrieved. You can download a message's header, a portion of the message, or the entire message. You can configure both protocols to retrieve all messages or just messages within a certain time period, such as the current day, a week, or a month. Both protocols also let you specify how much of a message's attachment to download to the handheld device. However, variations exist in the options settings between the two protocols. Table 1 details these variations.

Both protocols are similar in terms of synchronization capabilities; the differences lie mainly in the flexibility of those capabilities. For example, both protocols give you the option to have the handheld device automatically connect to and synchronize with the Exchange server. Both protocols work on the principle that you want this connection made at regular intervals (e.g., every 15 minutes). The significant difference between the synchronization capabilities is that ActiveSync lets you define schedules for both peak and nonpeak airtime hours, which means you can define a less frequent schedule for retrieval when the airtime rates are the most expensive. With IMAP, you can define only one schedule.

Another difference not shown in Table 1 is how and where you configure these settings. All the interfaces for configuring IMAP settings are available on the handheld device, so you can make changes at any time. To configure the ActiveSync settings, you must place the handheld device in its cradle and use the ActiveSync application on your PC to make changes.

Where Am I Supposed to Be?
Most people who use a wireless device to access Exchange want to access other personal information manager (PIM) data besides email, such as their calendars. You generally add items to calendars in three situations: when you create a meeting request, when you receive a meeting request, and when you create an appointment. When you create a meeting request, Exchange schedules time for you and one or more coworkers. When you send a meeting request, you're the organizer and other people are attendees. When you receive a meeting request, someone else is the organizer and you're an attendee. Usually organizers and attendees all have mailboxes in the same Exchange enterprise.

You create an appointment when you want to reserve or block out some time on your calendar. For example, you might add an appointment to make time to interview a candidate for a job vacancy or block out a few hours so that you can write a proposal. Appointments usually involve people outside the Exchange enterprise; otherwise, you could use a meeting request.

IMAP's and ActiveSync's capabilities differ significantly in how they handle creating and receiving meeting requests and creating appointments. Let's look at how each protocol handles those tasks.

IMAP: M Is for Message
As the letter M in Internet Message Access Protocol implies, you use IMAP to access mail messages. IMAP isn't designed for Calendar access. Because meeting requests use email as a transport, you can achieve a rudimentary level of Calendar integration when you use IMAP.

In the desktop version of Outlook, you have separate menu items for creating meeting requests and appointments. Pocket Outlook's menu has only one item labeled New Appointment, which you use to create both appointments and meeting requests. The difference between appointments and meeting requests is the inclusion of attendees, which Figure 1 shows. If you include attendees, Pocket Outlook processes the item as a meeting request; if not, Pocket Outlook processes the item as an appointment.

When you use the New Appointment option to create a meeting request, Pocket Outlook creates a meeting-request message and places the message in the Outbox for delivery to the attendees the next time it connects to Exchange. When you receive a meeting request, that request arrives in Pocket Outlook's Inbox. You can open the request and accept or decline the invitation. Unlike the desktop version, Pocket Outlook doesn't preprocess the invitation in the background and add it to your Calendar as a tentative meeting. Only when you accept the invitation will Pocket Outlook add the meeting to your Calendar and place a meeting-acceptance message in the Outbox. The next time Pocket Outlook connects to Exchange, Exchange delivers the meeting-acceptance message and removes the meeting request from your server-side Inbox.

Because IMAP defines only how to access and manipulate mail messages, it doesn't automatically update the meeting in the server-side Calendar. Similarly, appointments entered in Pocket Outlook's Calendar aren't updated in the server-side Calendar. The missing appointments and meetings can be problematic because anyone who uses Exchange's free/busy view of a calendar to plan meetings won't have a true picture of users' availability. To enter the item in the server-side Calendar, you have two options:

  1. You can place the handheld device in its cradle and use your PC's ActiveSync application to copy the item from the handheld device to the server. This process updates appointments and meetings on the server but leaves the free/busy view out of sync with your handheld device until you return the handheld device to the cradle.
  2. Microsoft includes a feature in the IMAP virtual server that inserts an Outlook Web Access (OWA) URL in meeting requests that you receive. This URL lets you access meeting requests through OWA. Accepting a meeting request through OWA causes Exchange to block out the meeting's time in your server-side Calendar. However, this option doesn't help much when you initiate Calendar changes because OWA isn't used to creating appointments or meetings in Pocket Outlook.

To make the OWA URLs usable, you need to configure the system to include the fully qualified server name in the URL. If you don't, Microsoft Pocket Internet Explorer (PIE) won't be able to locate the OWA server. See the Web-exclusive sidebar "Configuring IMAP Calendar URLs" (http://www.winnetmag.com/microsoftexchangeoutlook, InstantDoc ID 42547) for details about configuring a fully qualified host name.

If you accept a meeting request in OWA, you also need to accept the meeting request that's delivered to Pocket Outlook's Inbox. If you don't, you have to wait to synchronize at the desktop PC to add the item to your handheld device's Calendar. When you tap Accept in the meeting request in Pocket Outlook, Pocket Outlook asks whether you want to send an acceptance message to the originator. If you already accepted the meeting in OWA, make sure you don't send a notification in Pocket Outlook. Otherwise, the organizer will receive two acceptance messages from you.

You need to make sure you accept the meeting in OWA before you accept the meeting in Pocket Outlook. Not following this sequence is a nuisance that can become a problem. The nuisance is that while the meeting request is in Pocket Outlook's Inbox, the embedded URL is an active link that you can open with a tap. As soon as you tap Accept to accept the meeting request, Pocket Outlook processes the acceptance, then removes the meeting request from the Inbox. Thus, to use the link, you must access it from the Calendar. Because Pocket Outlook converts the URL to plain text, you need to copy the URL into PIE.

Not following the proper sequence becomes a problem when you make an IMAP connection before you open the URL. The inserted URL references the meeting request as a message in the server-side Inbox (e.g., server.domain.com/exchange/neubauer/inbox/E2k3.eml?cmd=open). When you accept the meeting request on the handheld device, Pocket Outlook processes the request, then moves the meeting request from its Inbox to its Deleted Items folder. If you then open an IMAP connection, IMAP mirrors this move on the server side. If you later try to open the OWA URL, the link is no longer valid because the referenced message is no longer in the server-side Inbox.

ActiveSync: S Is for Synchronization
ActiveSync operates by comparing the state of objects in related containers (e.g., the Inboxes on a server and a handheld device), then synchronizing those containers so that they contain identical objects. Because Microsoft designed ActiveSync to access Exchange, ActiveSync doesn't have the same constraints as IMAP and can process changes to any Outlook-accessible folder in your Exchange mailbox. Because ActiveSync isn't restricted to processing email objects, ActiveSync provides much tighter Calendar integration. ActiveSync mirrors meeting requests and appointments between the handheld device's Calendar and the server-side Calendar, regardless of who sent the meeting invitation or scheduled the appointment.

For example, if you block out some time in Pocket Outlook's Calendar by scheduling an appointment or by sending a meeting request, ActiveSync mirrors the blocked time in the server-side Calendar. If you block out some time in Pocket Outlook's Calendar by accepting a meeting invitation, ActiveSync mirrors the blocked time in the server-side Calendar. Similarly, any changes introduced on the server-side Calendar are mirrored to the handheld device's Calendar. With these capabilities, IMAP is no match for ActiveSync when it comes to Calendar operations.

The only catch to making ActiveSync Calendar synchronization work is that you must configure an automatic connection schedule. If you don't set a schedule, ActiveSync won't synchronize Calendar changes. Initiating ActiveSync manually from the Inbox processes only items in the folders that are selected for email synchronization; in other words, the Calendar folder isn't synchronized.

Counting the Bytes
If the differences in configuration or functional performance aren't enough to sway you to choose one protocol over another, you might consider how the protocols might affect your network. The impact can be especially important if your airtime plan doesn't include unlimited usage. To understand the impact, I measured the amount of traffic that was transferred between a server hosting a mailbox and my HP iPAQ by using both IMAP and ActiveSync. I wanted to see which protocol was more efficient in terms of the number of bytes exchanged.

I configured an Exchange 2003 server to allow IMAP and ActiveSync access to the hosted accounts. A 100Mb network connected the server to a wireless access point, and a 10Mb Ethernet card in my iPAQ completed the wireless connection. On the server, I ran Network Monitor configured with capture filters so that it counted only the traffic moving between the server and my handheld device.

Over the course of a week, I used separate IMAP and ActiveSync connections to download mail that I received in my HP mail account. Table 2 lists the numbers and sizes of messages for each day. Before beginning each day, I cleared my Inbox of any items from previous days and made copies of the items in the Inbox so that I could reset the contents and run the test multiple times to confirm the results.

After starting a monitoring session, I used an ActiveSync connection to download messages from Exchange 2003 to my iPAQ by synchronizing the Inbox and recorded the number of kilobytes transferred. I then deleted the messages on the iPAQ, synchronized the Inbox, and recorded the number of kilobytes transferred. Finally, I moved the messages to another folder, synchronized the Inbox, and recorded the number of kilobytes transferred. To ensure that the results were accurate, I repeated these three actions (i.e., download, delete, and move) three more times, for a total of four tests for each action. Then, for each action, I calculated the average number of bytes transferred by using the results of the four tests. After I completed all the ActiveSync tests, I repeated the same tests using an IMAP connection.

Graph 1 compares the results of the download testing. As you can see, ActiveSync transfers the messages from the server to the handheld much more efficiently than IMAP. The weeklong average showed about 45 percent less traffic. Graph 2 and Graph 3 show the results for the move and delete operations, respectively. The comparison for the move operation again shows that ActiveSync is a better performer than IMAP because ActiveSync produces about 45 percent less traffic. For the delete operation, the difference in performance is striking: Compared with IMAP, ActiveSync pushed 80 percent fewer bytes onto the network.

Making a Choice
The protocol that's best for your organization depends largely on the needs of your users. Both protocols are matched in terms of access and functionality related to email. However, if your users need to access email from a variety of mail platforms, IMAP is the better choice. Although IMAP gives you some capabilities for synchronizing calendars, ActiveSync is clearly the best choice if your users want to integrate their Exchange and Pocket Outlook Calendars. ActiveSync is also the clear winner in terms of network usage. If your airtime plan doesn't include unlimited usage, ActiveSync is the protocol for you.