I am loading the list of emails from Gmail with imap. The list of ids return, they are just listed like 1, 2, 3, even though I am using “SE_UID” which is supposed to return a proper unique id. $mailsIds = imap_search($this->getImapStream(), $criteria, SE_UID, $this->serverEncoding);
Also, moving the mail does nothing. I have tried $mailBox=“[Gmail]/Trash”, $mailBox=“[Gmail]/Starred”, etc. I have tried both with and without CP_UID.
and are you invoking imap_expunge to clean up after you’re done moving?
EDIT: I can read. derp.
Is getImapStream opening a new connection over and over? (My thoughts: If getImapStream is opening a new stream every time, then your expunge call isnt operating on the same thread as the move, which may be causing problems.)