Archived Forum Post

Index of archived forum posts

Question:

IMAP FetchHeaders and FetchBundle resuls in emails in different order

Feb 01 '16 at 08:37

I have been using Chilkat IMAP component to read e-mails but lately I made a chance to the software. Before I used

bundle=imap.FetchBundle(messageSet);

And I replaced it with

bundle = imap.FetchHeaders(messageSet);

But the problem is that now headers are in different order. I added

bundle.SortByDate(true);

Now most of headers are in same order than in Lotus Notes but a few are in different order.

I think this is mostly Domino problem, FetchHeaders returns messages where IMAP UID:s aren't always in sequence. I solved this problem by sorting headers vy UID.


Answer

Chilkat is not re-ordering the messages it receives in any way...


Answer

Yes, I thought so. It seems that Domino IMAP is broken, Thunderbird shows messages in same order than Chilkat FetchHeaders does, FetchBundle and LotusNotes in same order. These orders are not same.

How Does Bunde.SortByDate work and it might be good thing to add SortByUid (but this is just domino specific as SortByDate should work that way).