public function sortMails($criteria = SORTARRIVAL, $reverse = true) {
		return imap_sort($this->getImapStream(), $criteria, $reverse, SE_UID);
	}
public function sortMails($criteria = SORTARRIVAL, $reverse = true) {
		return imap_sort($this->getImapStream(), $criteria, $reverse, SE_UID);
	}
public function sortMails ( $ criteria = SORTARRIVAL , $ reverse = true ) { return imap_sort ( $ this -> getImapStream ( ) , $ criteria , $ reverse , SE_UID ) ; }
Gets mails ids sorted by some criteria

Criteria can be one (and only one) of the following constants:
SORTDATE - mail Date
SORTARRIVAL - arrival date (default)
SORTFROM - mailbox in first From address
SORTSUBJECT - mail subject
SORTTO - mailbox in first To address
SORTCC - mailbox in first cc address
SORTSIZE - size of mail in octets

@param int $criteria
@param bool $reverse
@return array Mails ids
Gets mails ids sorted by some criteria