我正在连接到IMAP邮箱并尝试使用PHP和Zend 1.12创建文件夹INBOX / test:
$this->Mail = new Zend_Mail_Storage_Imap(array(
'host' => $this->sHost,
'port' => $this->nPort,
'user' => $this->sUser,
'password' => $this->sPass,
'ssl' => $this->sSsl,
'folder' => 'INBOX')); // Works, I can get all messages in INBOX for example
$allFolders = $this->Mail->getFolders('INBOX'); // Throws 'Zend_Mail_Storage_Exception' with message 'folder not found'
$this->Mail->createFolder('test', 'INBOX'); // Throws 'Zend_Mail_Storage_Exception' with message 'cannot create folder'
$Folder = $this->Mail->getFolders()->INBOX; // Works, so INBOX is there
任何想法可能出错?
答案 0 :(得分:0)
$allFolders = $this->Mail->getFolders('INBOX.');
$this->Mail->createFolder('INBOX.test');
注意INBOX背后的点,这使它有效。