Esempio n. 1
0
 /**
  * set flags for message
  *
  * NOTE: this method can't set the recent flag.
  *
  * @param  int   $id    number of message
  * @param  array $flags new flags for message
  * @throws Zend_Mail_Storage_Exception
  */
 public function setFlags($id, $flags)
 {
     if (!$this->_protocol->store($flags, $id)) {
         /**
          * @see Zend_Mail_Storage_Exception
          */
         throw new Zend_Mail_Storage_Exception('cannot set flags, have you tried to set the recent flag or special chars?');
     }
 }
Esempio n. 2
0
 /**
  * set flags for message
  *
  * NOTE: this method can't set the recent flag.
  *
  * @param  int   $id    number of message
  * @param  array $flags new flags for message
  * @throws Zend_Mail_Storage_Exception
  */
 public function setFlags($id, $flags)
 {
     if (!$this->_protocol->store($flags, $id)) {
         /**
          * @see Zend_Mail_Storage_Exception
          */
         require_once 'include/Zend/Mail/Storage/Exception.php';
         throw new Zend_Mail_Storage_Exception('cannot set flags, have you tried to set the recent flag or special chars?');
     }
 }
Esempio n. 3
0
 public function testStore()
 {
     $protocol = new Zend_Mail_Protocol_Imap($this->_params['host']);
     $protocol->login($this->_params['user'], $this->_params['password']);
     $protocol->select('INBOX');
     $this->assertTrue($protocol->store(array('\\Flagged'), 1));
     $this->assertTrue($protocol->store(array('\\Flagged'), 1, null, '-'));
     $this->assertTrue($protocol->store(array('\\Flagged'), 1, null, '+'));
     $result = $protocol->store(array('\\Flagged'), 1, null, '', false);
     $this->assertTrue(in_array('\\Flagged', $result[1]));
     $result = $protocol->store(array('\\Flagged'), 1, null, '-', false);
     $this->assertFalse(in_array('\\Flagged', $result[1]));
     $result = $protocol->store(array('\\Flagged'), 1, null, '+', false);
     $this->assertTrue(in_array('\\Flagged', $result[1]));
 }