public function mbox_exists($name){
    if ( $this->is_connected() && !empty($name) ){
      $names = $this->get_all_names_mboxes();
      if ( !empty($names) && \in_array($name, $names) ){
        return true;
      }
    }
    return false;
  }
public function mbox_exists($name){
    if ( $this->is_connected() && !empty($name) ){
      $names = $this->get_all_names_mboxes();
      if ( !empty($names) && \in_array($name, $names) ){
        return true;
      }
    }
    return false;
  }
public function mbox_exists ( $ name ) { if ( $ this -> is_connected ( ) && ! empty ( $ name ) ) { $ names = $ this -> get_all_names_mboxes ( ) ; if ( ! empty ( $ names ) && \ in_array ( $ name , $ names ) ) { return true ; } } return false ; }
Check if a mailbox exists

@param string $name The mailbox name
@return bool
Check if a mailbox exists