SortCriteria Property
Sorts criteria to use for message retrieval operations.
Syntax
ANSI (Cross Platform) char* GetSortCriteria();
int SetSortCriteria(const char* lpszSortCriteria); Unicode (Windows) LPWSTR GetSortCriteria();
INT SetSortCriteria(LPCWSTR lpszSortCriteria);
@property (nonatomic,readwrite,assign,getter=sortCriteria,setter=setSortCriteria:) NSString* sortCriteria; - (NSString*)sortCriteria; - (void)setSortCriteria:(NSString*)newSortCriteria;
#define PID_IMAP_SORTCRITERIA 71 IPWORKS_EXTERNAL void* IPWORKS_CALL IPWorks_IMAP_Get(void *lpObj, int propid, int arridx, int *lpcbVal, int64 *lpllVal); IPWORKS_EXTERNAL int IPWORKS_CALL IPWorks_IMAP_Set(void *lpObj, int propid, int arridx, const void *val, int cbVal);
Default Value
""
Remarks
This property sorts criteria to use for message retrieval operations. When set, the class will send the SORT command to the server before any retrieval. If the server supports the SORT command, the results from the fetch operation will be sorted according to SortCriteria. The format of the SortCriteria property consists of a parenthesized list of one or more sort keys.
Example (Setting SortCriteria)
IMAPControl.SortCriteria = "DATE" IMAPControl.SortCriteria = "SUBJECT FROM" IMAPControl.SortCriteria = "REVERSE SUBJECT"
Possible sort keys include:
ARRIVAL | Internal date and time of the message. |
DATE | The value of the message's DATE header, adjusted by time zone |
CC | The value of the message's CC header. |
FROM | The value of the message's FROM header. |
SUBJECT | The value of the message's SUBJECT header. |
TO | The value of the message's TO header. |
SIZE | The size of the message |
REVERSE <criterion> | Followed by another sort criterion, has the effect of that criterion but in reverse (descending) order |
Please note that IMAP SORT functionality is relatively new and not all servers may implement it.
Data Type
String