I am using a php script to retrieve emails like this:
$inbox = imap_open($hostname,$username,$password);
$emails = imap_search($inbox,'ALL');
Since I have many emails, I want only to process new emails so I'm trying to figure out how to search emails having id greater than id x
.
Problem is that I cannot find a single UID
search criteria for imap.
Is there any way to achieve this without having to loop all mails?