How to get OOF text from Exchange 2003 using WebDAV


You may be able to get OOF text with WebDAV using a SEARCH.  However, its not supported in any way and there is no guarentee that it will always work.  The OOF text is stored inside of a hidden item in a mailbox.  Below is a sample of the request which is for educational purposes only.  Please note that modifying hidden items in a mailbox which your application does not own can cause corruption of items and such corruption could cuase servere issues with Outlook, OWA and activesync devices.

<?xml version=’1.0′?> 

<D:searchrequest xmlns:D=’DAV:’> 

  <D:sql>SELECT 

      “urn:schemas:httpmail:textdescription” ,

      “DAV:creationdate”

  FROM SCOPE ( ‘SHALLOW TRAVERSAL OF “https://my2003server/exchange/administrator/Inbox/“‘ ) 

  WHERE (“DAV:isfolder”= FALSE) AND  (“http://schemas.microsoft.com/exchange/outlookmessageclass” like ‘%IPM.Note.Rules.OofTemplate.Microsoft%’) 

  </D:sql>

</D:searchrequest>

 

Here is a sample response:

<?xml version=”1.0″?>
<a:multistatus xmlns:b=”urn:uuid:c2f41010-65b3-11d1-a29f-00aa00c14882/” xmlns:d=”urn:schemas:httpmail:” xmlns:c=”xml:” xmlns:a=”DAV:”>
  <a:response>
    <a:href>https://my2003server/exchange/administrator/Inbox/Out%20of%20Office%20AutoReply:%20test-2.EML</a:href>
      <a:propstat>
      <a:status>HTTP/1.1 200 OK</a:status>
      <a:prop>
        <d:textdescription>I was out of office but now i am back!</d:textdescription>
        <a:creationdate b:dt=”dateTime.tz”>2012-10-22T18:36:39.208Z</a:creationdate>
      </a:prop>
    </a:propstat>
  </a:response>
  <a:response>
    <a:href>https://my2003server/exchange/administrator/Inbox/Out%20of%20Office%20AutoReply:%20test.EML</a:href>
    <a:propstat>
      <a:status>HTTP/1.1 200 OK</a:status>
      <a:prop>
        <d:textdescription>I am out of office</d:textdescription>
        <a:creationdate b:dt=”dateTime.tz”>2012-10-22T18:00:31.936Z</a:creationdate>
      </a:prop>
    </a:propstat>
  </a:response>
  <a:response>
    <a:href>https://my2003server/exchange/administrator/Inbox/No%20Subject-3.EML</a:href>
    <a:propstat>
      <a:status>HTTP/1.1 200 OK</a:status>
      <a:prop>
        <d:textdescription>I was out of office but now i am back for the third time!!!</d:textdescription>
        <a:creationdate b:dt=”dateTime.tz”>2012-10-22T18:00:17.717Z</a:creationdate>
      </a:prop>
    </a:propstat>
  </a:response>
</a:multistatus>

Comments (2)

  1. Tomas says:

    I have a question about a possible licensing of ActiveSync and I thought you would be able to help me and give me some answer.

    We have created a mobile email client application designed for various mobile devices (smartphones, tablets). We currently support IMAP and POP servers. In the future we want to give our users the ability to synchronize with their Microsoft Exchange Server using ActiveSync.

    Therefore, I have question whether we (as a the application producer) should buy/possess a license that allows us (and our users) to use ActiveSync or it works in a different way. In case of license what would be possible price for such services.

    I would be grateful for your help.

    Best regards!

  2. Ralf Scholl says:

    I have a question. The request works fine when the oof-state is 1 (out of office is set). But when the oof-state is 0 the response is only:

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"

    That all. Where is the issue?