public function addFolder($name, $subscribe = false) {
        $success = imap_createmailbox($this->imap, $this->mailbox . $name);

        if ($success && $subscribe) {
            $success = imap_subscribe($this->imap, $this->mailbox . $name);
        }

        return $success;
    }
public function addFolder($name, $subscribe = false) {
        $success = imap_createmailbox($this->imap, $this->mailbox . $name);

        if ($success && $subscribe) {
            $success = imap_subscribe($this->imap, $this->mailbox . $name);
        }

        return $success;
    }
public function addFolder ( $ name , $ subscribe = false ) { $ success = imap_createmailbox ( $ this -> imap , $ this -> mailbox . $ name ) ; if ( $ success && $ subscribe ) { $ success = imap_subscribe ( $ this -> imap , $ this -> mailbox . $ name ) ; } return $ success ; }
Add a new folder

@param string $name of the folder
@param bool|false $subscribe immediately subscribe to folder
@return bool success or not
Add a new folder