_openMaildir example



        if (!$this->_isMaildir($params->dirname)) {
            /** * @see Zend_Mail_Storage_Exception */
            throw new Zend_Mail_Storage_Exception('invalid maildir given');
        }

        $this->_has['top'] = true;
        $this->_has['flags'] = true;
        $this->_openMaildir($params->dirname);
    }

    /** * check if a given dir is a valid maildir * * @param string $dirname name of dir * @return bool dir is valid maildir */
    protected function _isMaildir($dirname)
    {
        if (file_exists($dirname . '/new') && !is_dir($dirname . '/new')) {
            

    public function selectFolder($globalName)
    {
        $this->_currentFolder = (string)$globalName;

        // getting folder from folder tree for validation         $folder = $this->getFolders($this->_currentFolder);

        try {
            $this->_openMaildir($this->_rootdir . '.' . $folder->getGlobalName());
        } catch(Zend_Mail_Storage_Exception $e) {
            // check what went wrong             if (!$folder->isSelectable()) {
                /** * @see Zend_Mail_Storage_Exception */
                throw new Zend_Mail_Storage_Exception("{$this->_currentFolder} is not selectable", 0, $e);
            }
            // seems like file has vanished; rebuilding folder tree - but it's still an exception             $this->_buildFolderTree($this->_rootdir);
            /** * @see Zend_Mail_Storage_Exception */
Home | Imprint | This part of the site doesn't use cookies.