First of all, there is a mistake on line 115
imap_delete($connection, $headerinfo>Msgno);
should read
imap_delete($connection, $headerinfo->Msgno);
I found out on my configuration that $headerinfo->Msgno is a string(4), which causes the imap_delete($connection, $headerinfo>Msgno);
to fail and mark deleted the first mail all the time.
the correct code should be
imap_delete($connection, (int)$headerinfo->Msgno);
Comments
Comment #1
robert castelo commentedThanks, fixed in 6.x-2.1.