From 14e14ab9b1976fd256e2ac93245f772ba3f457b2 Mon Sep 17 00:00:00 2001 From: gries Date: Tue, 20 Aug 2013 14:07:58 +0200 Subject: [PATCH] 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; } }