/** * Updates the mail box's folder * @param MailManager_Model_Folder $folder - folder instance * @param $options imap_status flags like SA_UNSEEN, SA_MESSAGES etc */ function updateFolder($folder, $options) { $result = @imap_status($this->mBox, $folder->name($this->mBoxUrl), $options); if ($result) { if (isset($result->unseen)) { $folder->setUnreadCount($result->unseen); } if (isset($result->messages)) { $folder->setCount($result->messages); } } }
/** * Updates the mail box's folder * @param MailManager_Model_Folder $folder - folder instance * @param $options imap_status flags like SA_UNSEEN, SA_MESSAGES etc */ public function updateFolder($folder, $options) { $mailbox = $this->convertCharacterEncoding($folder->name($this->mBoxUrl), "UTF7-IMAP", "ISO_8859-1"); //Encode folder name $result = @imap_status($this->mBox, $mailbox, $options); if ($result) { if (isset($result->unseen)) { $folder->setUnreadCount($result->unseen); } if (isset($result->messages)) { $folder->setCount($result->messages); } } }