none
ActiveSync (12.1): Retrieving the latest 50 emails RRS feed

  • Question

  • Is it possible to retrieve the latest 50 emails using ActiveSync? Right now, when I specify the following, it retrieves the 50 OLDEST emails. Using a filter type of, say, a month, retrieves all the emails I've received in the last month but they are in order from oldest to newest, so if I put a windowSize of 50, my first sync request would return the oldest 50 emails in the given time frame (a month).

    <?xml version="1.0" ?>
    <Sync xmlns="AirSync:">
      <Collections>
        <Collection>
          <SyncKey>930262771</SyncKey>
          <CollectionId>6</CollectionId>
          <WindowSize>50</WindowSize>
        </Collection>
      </Collections>
    </Sync>






    • Edited by mliecah Wednesday, February 8, 2012 6:22 PM
    Wednesday, February 8, 2012 6:21 PM

Answers

  • Hi mliecah,

    In the current ActiveSync protocol there is no time related restrictions which mails will go to the WindowSize group if more than WindowSize qualified emails are available. If you want to retrieve the newer emails first start the FilterType with a small number. Pay attention to the SoftDelete elements what the server might send.

    Regards, Vilmos

    • Proposed as answer by Vilmos Foltenyi Tuesday, February 14, 2012 5:23 PM
    • Marked as answer by mliecah Thursday, February 16, 2012 9:22 PM
    Tuesday, February 14, 2012 5:23 PM

All replies

  • Hi mliecah,

    Thanks for posting on the MSDN Forum. One of our support engineers will respond soon.

    Regards,
    Vilmos Foltenyi - MSFT

    Wednesday, February 8, 2012 7:15 PM
  • Hi mliecah,

    I am the engineer who will be working with you on this issue. I am currently researching the problem and will provide you with an update soon.

    Regards,
    Vilmos Foltenyi - MSFT

    Friday, February 10, 2012 7:24 AM
  • Hi mliecah,

    In the current ActiveSync protocol there is no time related restrictions which mails will go to the WindowSize group if more than WindowSize qualified emails are available. If you want to retrieve the newer emails first start the FilterType with a small number. Pay attention to the SoftDelete elements what the server might send.

    Regards, Vilmos

    • Proposed as answer by Vilmos Foltenyi Tuesday, February 14, 2012 5:23 PM
    • Marked as answer by mliecah Thursday, February 16, 2012 9:22 PM
    Tuesday, February 14, 2012 5:23 PM
  • Hello Vilmos,

    What is the best way to retrieve all of a user's emails from newest to oldest? If I make multiple sync requests with increasing FilterType values, will each sync request start from scratch, or will it know that I have already retrieved some of the more recent emails so far?

    Alternatively, is it possible to specify a filter range (i.e. sync emails sent between 3 days back and 1 week back) to prevent re-syncing the same emails?

    Thank you very much,

    - J


    Tuesday, September 4, 2012 5:42 PM
  • Hi, Joshua,

    Thank you for your question.  An engineer from the Protocols team will contact you soon.


    Bryan S. Burgin Senior Escalation Engineer Microsoft Protocol Open Specifications Team

    Tuesday, September 4, 2012 6:41 PM
    Moderator
  • Hi Joshua,

    I assume your question is in the Sync command context. As I wrote in my previous posting there is no time related restrictions in the ActiveSync protocol, which mails will go to the WindowSize group if more than WindowSize qualified items are available; there is no way to retrieve the emails from newest to oldest sorted order. The answer to your other question is: if you properly update the SyncKey in your application, you will not get duplicate items.

    Thanks, Vilmos
    Friday, September 21, 2012 12:04 AM