在ActiveSync中设置电子邮件的标志

时间:2013-04-23 13:46:36

标签: activesync

尝试使用ActiveSync设置电子邮件的状态标记。以下是我的要求。我收到状态6.我的请求有什么问题?

请求

<Sync xmlns="AirSync:" xmlns:email="Email:" xmlns:tasks="Tasks:" >
 <Collections>
     <Collection>
         <SyncKey>648263900</SyncKey>
         <CollectionId>11</CollectionId>
         <GetChanges>0</GetChanges>
         <Commands>
             <Change>
                 <ServerId>11:2</ServerId>
                 <ApplicationData>
                      <email:Flag>
                         <email:Status>1</email:Status>
                         <email:FlagType>Follow Up</email:FlagType>
                         <tasks:StartDate>113-04-23T05:30:00.000Z</tasks:StartDate>
                         <tasks:UTCStartDate>113-04-23T05:30:00.000Z</tasks:UTCStartDate>
                         <tasks:DueDate>113-04-26T05:30:00.000Z</tasks:DueDate> 
                         <tasks:UTCDueDate>113-04-26T05:30:00.000Z</tasks:UTCDueDate>
                     </email:Flag>
                 </ApplicationData>
             </Change>
         </Commands>
     </Collection>
 </Collections>

我收到的回复

 <?xml version="1.0"?>
<!DOCTYPE ActiveSync PUBLIC "-//MICROSOFT//DTD ActiveSync//EN" "http://www.microsoft.com/">
<Sync xmlns="AirSync:">
    <Collections>
        <Collection>
            <SyncKey>648263900</SyncKey>
            <CollectionId>11</CollectionId>
            <Status>1</Status>
            <Responses>
                <Change>
                    <ServerId>11:2</ServerId>
                    <Status>6</Status>
                </Change>
            </Responses>
        </Collection>
    </Collections>
</Sync>

1 个答案:

答案 0 :(得分:1)

更改电子邮件:FlagType从Follow Upfor Follow Up

最后添加</Sync>

尝试:

<?xml version="1.0" encoding="utf-8"?>
<Sync xmlns="AirSync:" xmlns:email="Email:" xmlns:tasks="Tasks:" >
 <Collections>
     <Collection>
         <SyncKey>648263900</SyncKey>
         <CollectionId>11</CollectionId>
         <GetChanges>0</GetChanges>
         <Commands>
             <Change>
                 <ServerId>11:2</ServerId>
                 <ApplicationData>
                      <email:Flag>
                         <email:Status>1</email:Status>
                         <email:FlagType>for Follow Up</email:FlagType>
                         <tasks:StartDate>113-04-23T05:30:00.000Z</tasks:StartDate>
                         <tasks:UTCStartDate>113-04-23T05:30:00.000Z</tasks:UTCStartDate>
                         <tasks:DueDate>113-04-26T05:30:00.000Z</tasks:DueDate> 
                         <tasks:UTCDueDate>113-04-26T05:30:00.000Z</tasks:UTCDueDate>
                     </email:Flag>
                 </ApplicationData>
             </Change>
         </Commands>
     </Collection>
 </Collections>
</Sync>

查看更多:MS-ASEMAIL