public function search($search = '', $criteria = SORTDATE, $opt = SE_UID, $dir = 1)
    {
        if ('' === ($search = trim($search))) {
            $search = null;
        }

        return imap_sort($this->stream, $criteria, $dir, $opt, $search);
    }