function connect()
    {
        if ( $this->mailbox !== null && $this->username !== null && $this->password !== null ) {
            if ( $this->stream = imap_open($this->mailbox, $this->username, $this->password) ) {
                return true;
            } else {
                throw new Exception(sprintf("Invalid IMAP stream (mailbox: %s, username: %s)", $this->mailbox, $this->username));
            }
        } else {
            throw new Exception(sprintf("Missing IMAP settings: mailbox, username, and/or password"));
        }
    }
function connect()
    {
        if ( $this->mailbox !== null && $this->username !== null && $this->password !== null ) {
            if ( $this->stream = imap_open($this->mailbox, $this->username, $this->password) ) {
                return true;
            } else {
                throw new Exception(sprintf("Invalid IMAP stream (mailbox: %s, username: %s)", $this->mailbox, $this->username));
            }
        } else {
            throw new Exception(sprintf("Missing IMAP settings: mailbox, username, and/or password"));
        }
    }
function connect ( ) { if ( $ this -> mailbox !== null && $ this -> username !== null && $ this -> password !== null ) { if ( $ this -> stream = imap_open ( $ this -> mailbox , $ this -> username , $ this -> password ) ) { return true ; } else { throw new Exception ( sprintf ( "Invalid IMAP stream (mailbox: %s, username: %s)" , $ this -> mailbox , $ this -> username ) ) ; } } else { throw new Exception ( sprintf ( "Missing IMAP settings: mailbox, username, and/or password" ) ) ; } }
open the server stream
open the server stream