I am using PHP's imap functions and want to retrieve emails with a UID > n. This works when searching dates but not UIDs.
$imap = imap_open($host, $username, $password);
$emails = imap_search($imap, 'SINCE "8 September 2016"');
var_dump($emails);
This outputs:
array(16) {
[0]=>int(30)
[1]=>int(31)
[2]=>int(32)
[3]=>int(33)
[4]=>int(34)
[5]=>int(35)
[6]=>int(36)
[7]=>int(37)
[8]=>int(38)
[9]=>int(39)
[10]=>int(40)
[11]=>int(41)
[12]=>int(42)
[13]=>int(43)
[14]=>int(44)
[15]=>int(45)
}
When I try searching by UID:
$emails = imap_search($imap, 'UID SEARCH UID 1:*');
var_dump($emails);
This outputs:
bool(false)
Any ideas would be appreciated.