From f114f4980331f9b71b81b81cbd1a6c1f8303d13a Mon Sep 17 00:00:00 2001 From: Roger Llopart Pla Date: Tue, 18 Sep 2012 12:31:30 +0200 Subject: [PATCH] Added the method Message::moveToMailbox() in order to be able to move a message to the given mailbox. --- src/Fetch/Message.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/Fetch/Message.php b/src/Fetch/Message.php index 770a2af..c139f2a 100644 --- a/src/Fetch/Message.php +++ b/src/Fetch/Message.php @@ -636,4 +636,15 @@ class Message } } + /** + * This function is used to move a mail to the given mailbox. + * + * @param $mailbox + * + * @return bool + */ + public function moveToMailBox($mailbox) + { + return imap_mail_copy($this->imapStream, $this->uid, $mailbox, CP_UID | CP_MOVE); + } }