4.3 DeleteInboxRule

The following is an example of an UpdateInboxRules operation that deletes an Inbox rule (2).

The client constructs the request XML and sends it to the server. The DeleteRuleOperation complex type contains the RuleId element, which contains the rule (2) ID of the rule (2) to be deleted.

 <?xml version="1.0" encoding="utf-8"?>
 <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages"
         xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types"
         xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
   <soap:Header>
     <t:RequestServerVersion Version="Exchange2010_SP1" />
   </soap:Header>
   <soap:Body>
     <m:UpdateInboxRules>
       <m:RemoveOutlookRuleBlob>true</m:RemoveOutlookRuleBlob>
       <m:Operations>
         <t:DeleteRuleOperation>
           <t:RuleId>dCsAAABjzwY=</t:RuleId>
         </t:DeleteRuleOperation>
       </m:Operations>
     </m:UpdateInboxRules>
   </soap:Body>
 </soap:Envelope>

The server constructs the response XML and sends it to the client.

 <?xml version="1.0" encoding="utf-8"?>
 <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
   <s:Header>
     <h:ServerVersionInfo MajorVersion="14" 
         MinorVersion="1" MajorBuildNumber="139" 
         MinorBuildNumber="0" 
         Version="Exchange2010_SP1" 
         xmlns:h="http://schemas.microsoft.com/exchange/services/2006/types" 
         xmlns="http://schemas.microsoft.com/exchange/services/2006/types" 
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
         xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
   </s:Header>
   <s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
         xmlns:xsd="http://www.w3.org/2001/XMLSchema">
     <UpdateInboxRulesResponse ResponseClass="Success" 
         xmlns="http://schemas.microsoft.com/exchange/services/2006/messages">
       <ResponseCode>NoError</ResponseCode>
     </UpdateInboxRulesResponse>
   </s:Body>
 </s:Envelope>
Show: