I store a local copy of my Gmail inbox via PHP IMAP. I need to fetch any emails which had not been fetched before. This is possible by date
as
imap_search($imap, 'SINCE "15 April 2022"');
but, I look for a possibility to fetch all emails with the condition of UID>x
where x
is the UID
of the last email fetched since working with a unique ID is easier than date
.