From 14e14ab9b1976fd256e2ac93245f772ba3f457b2 Mon Sep 17 00:00:00 2001 From: gries Date: Tue, 20 Aug 2013 14:07:58 +0200 Subject: [PATCH 1/2] Fix moveToMailBox. Without the expunge call a copy of the file would remain hidden on the original path. --- src/Fetch/Message.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Fetch/Message.php b/src/Fetch/Message.php index e39335e..5272443 100644 --- a/src/Fetch/Message.php +++ b/src/Fetch/Message.php @@ -650,6 +650,9 @@ class Message */ public function moveToMailBox($mailbox) { - return imap_mail_copy($this->imapStream, $this->uid, $mailbox, CP_UID | CP_MOVE); + $returnValue = imap_mail_copy($this->imapStream, $this->uid, $mailbox, CP_UID | CP_MOVE); + imap_expunge($this->imapStream); + + return $returnValue; } } From 99ff744c5b1d300385bf2448f3f9ee04937b692d Mon Sep 17 00:00:00 2001 From: gries Date: Tue, 20 Aug 2013 14:09:13 +0200 Subject: [PATCH 2/2] CS fix. --- src/Fetch/Message.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Fetch/Message.php b/src/Fetch/Message.php index 5272443..009829f 100644 --- a/src/Fetch/Message.php +++ b/src/Fetch/Message.php @@ -651,8 +651,8 @@ class Message public function moveToMailBox($mailbox) { $returnValue = imap_mail_copy($this->imapStream, $this->uid, $mailbox, CP_UID | CP_MOVE); - imap_expunge($this->imapStream); + imap_expunge($this->imapStream); - return $returnValue; + return $returnValue; } }