Author |
|
ngboonseong Newbie
Joined: 02 May 2010 Location: Singapore
Online Status: Offline Posts: 2
|
Posted: 02 May 2010 at 8:33pm | IP Logged
|
|
|
Hi,
I would like to know if the IMAP server does not
support SORT extension, is there any sorting
features built-in in the mailbee.net library ?
If no, may I know the best way to do my own
sorting logic ?
Thanks.
Regards,
Boon Seong
|
Back to Top |
|
|
Alex AfterLogic Support
Joined: 19 November 2003
Online Status: Offline Posts: 2206
|
Posted: 03 May 2010 at 12:50am | IP Logged
|
|
|
If sorting is not supported by the server, you'll have to load all the envelopes (or headers) in the database and sort using the database engine.
The main problem if the server does not support sorting that you have to download ALL envelopes/headers even if you need to display a single page (for instance, 20 emails out of 5000 in the folder). Of course, you don't want to do this every time you need to display the message list.
Thus, even if MailBee.NET provided its internal facilities for sorting, this would have a little sense (if you download 20 emails and then sort them with MailBee.NET, you'd still get wrong order because sorting must be done before paging).
All email clients perform this task the same way: download all envelopes/headers locally and then use database queries to get paging and then sorting.
Or, alternatively, you can just limit sorting support in your application to the natural date order (or inverse order using Reverse method of MailMessageCollection or EnvelopeCollection). In our experience, sorting can usually be superseded with a good search/filtering facility.
Regards,
Alex
|
Back to Top |
|
|