/** * Remove a message from server. If you're doing that from a web enviroment * you should be careful and use a uniqueid as parameter if possible to * identify the message. * * @param int $id number of message * @return null */ public function removeMessage($id) { if (!$this->_protocol->store(array(Zend_Mail_Storage::FLAG_DELETED), $id, null, '+')) { throw new Zend_Mail_Storage_Exception('cannot set deleted flag'); } // TODO: expunge here or at close? we can handle an error here better and are more fail safe if (!$this->_protocol->expunge()) { throw new Zend_Mail_Storage_Exception('message marked as deleted, but could not expunge'); } }