ZF-10821: moveMessage() not executing with IMAP and gmail folders (tags)


I simplified the code that is not working. The folder exists. This code is not throwing any errors but is not actually moving the file. If I activate the commented line the email is marked as seen, so the unique id is correct.

foreach ($this->mail as $key => $email) { $uniqueId = $this->mail->getUniqueId ($key); if ('' == $email->from && $email->isMultipart()){ //move it to the backup folder #$this->mail->setFlags($uniqueId, array(Zend_Mail_Storage::FLAG_SEEN)); $this->mail->moveMessage($uniqueId, $this->destination_folder); } }

While debugging I see that a copy is executed first. Zend/Mail/Protocol/Imap.php that sendRequest() is used to send :

TAG23 COPY 10807 "myTag"

and the response is TRUE.

Later a removeMessage($id) call is made with this content: TAG24 STORE 10807 +FLAGS.SILENT (\Deleted)

The response is as well TRUE, but no real modifications happen in the Gmail mailbox. Is a pro Gmail account if this is relevant in any way.


No comments to display