Criteria can be one (and only one) of the following: SORTDATE - message Date SORTARRIVAL - arrival date SORTFROM - mailbox in first From address SORTSUBJECT - message subject SORTTO - mailbox in first To address SORTCC - mailbox in first cc address SORTSIZE - size of message in octets
function($criteria, $reverse = 0)
{
if ($this->_is_connected() && !empty($criteria)) {
return imap_sort($this->stream, constant(strtoupper($criteria)), $reverse, SE_NOPREFETCH);
}
return false;
}