Esempio n. 1
0
 /**
  * create new system folder
  * 
  * @param Felamimail_Model_Account $_account
  * @param string $_systemFolder
  * @return Felamimail_Model_Folder
  */
 protected function _createSystemFolder(Felamimail_Model_Account $_account, $_systemFolder)
 {
     Tinebase_Core::getLogger()->notice(__METHOD__ . '::' . __LINE__ . ' Folder not found: ' . $_systemFolder . '. Trying to add it.');
     $splitFolderName = Felamimail_Model_Folder::extractLocalnameAndParent($_systemFolder, $_account->delimiter);
     try {
         $result = Felamimail_Controller_Folder::getInstance()->create($_account, $splitFolderName['localname'], $splitFolderName['parent']);
     } catch (Felamimail_Exception_IMAPServiceUnavailable $feisu) {
         if (Tinebase_Core::isLogLevel(Zend_Log::DEBUG)) {
             Tinebase_Core::getLogger()->debug(__METHOD__ . '::' . __LINE__ . ' ' . $feisu->getMessage());
         }
         // try again with INBOX as parent because some IMAP servers can not handle namespaces correctly
         $result = Felamimail_Controller_Folder::getInstance()->create($_account, $splitFolderName['localname'], 'INBOX');
     }
     return $result;
 }