4.1.1 Synchronizing Only E-Mail Metadata

The following example demonstrates a client request to synchronize e-mail metadata in the Inbox folder with the server, and the server response. The CollectionId element ([MS-ASCMD] section 2.2.3.30.6) in the Sync command request ([MS-ASCMD] section 2.2.1.21) identifies the Inbox folder as the folder to synchronize, and because the request does not specify that the response include e-mail body content, only e-mail metadata is included in the response. In this example, the server returns metadata for one e-mail item. The Sync command response includes the estimated size and body type of the e-mail message, but does not include the body of the message.

Request:

 <?xml version="1.0" encoding="utf-8"?>
 <Sync xmlns="AirSync:">
   <Collections>
     <Collection>
       <SyncKey>927479200</SyncKey>
       <CollectionId>5</CollectionId>
       <DeletesAsMoves>1</DeletesAsMoves>
       <GetChanges>1</GetChanges>
       <WindowSize>512</WindowSize>
     </Collection>
   </Collections>
 </Sync>

Response:

 <?xml version="1.0" encoding="utf-8"?>
 <Sync xmlns:email="Email:" xmlns:airsyncbase="AirSyncBase:" xmlns:email2="Email2:" xmlns="AirSync:">
   <Collections>
     <Collection>
       <SyncKey>927479210</SyncKey>
       <CollectionId>5</CollectionId>
       <Status>1</Status>
       <Commands>
         <Add>
           <ServerId>5:1</ServerId>
           <ApplicationData>
             <email:To>"Device User" &lt;someone1@example.com&gt;</email:To>
             <email:From>"Device User 2" &lt;someone2@example.com&gt;</email:From>
             <email:Subject>New mail message</email:Subject>
             <email:DateReceived>2009-07-29T19:25:37.817Z</email:DateReceived>
             <email:DisplayTo>Device User</email:DisplayTo>
             <email:ThreadTopic>New mail message</email:ThreadTopic>
             <email:Importance>1</email:Importance>
             <email:Read>0</email:Read>
             <airsyncbase:Body>
               <airsyncbase:Type>2</airsyncbase:Type>
               <airsyncbase:EstimatedDataSize>116575</airsyncbase:EstimatedDataSize>
               <airsyncbase:Truncated>1</airsyncbase:Truncated>
             </airsyncbase:Body>
             <email:MessageClass>IPM.Note</email:MessageClass>
             <email:InternetCPID>1252</email:InternetCPID>
             <email:Flag />
             <email:ContentClass>urn:content-classes:message</email:ContentClass>
             <airsyncbase:NativeBodyType>2</airsyncbase:NativeBodyType>
             <email2:ConversationId>FF68022058BD485996BE15F6F6D99320</email2:ConversationId>
             <email2:ConversationIndex>CA2CFA8A23</email2:ConversationIndex>
             <email:Categories />
           </ApplicationData>
         </Add>
       </Commands>
     </Collection>
   </Collections>
 </Sync>
Show: