public function getMessage($id = '')
    {
        $message = [];
        if (is_array($this->messages) == true) {
            foreach($this ->messages as $msg) {
                if ($msg['index'] == $id) {
                    $message = $msg;
                    break;
                }
            }
        }

        if (is_array($message) === true) {
            // Get the message body but do not mark as read
            $message['body'] = quoted_printable_decode(imap_fetchbody($this->conn, $message['index'], FT_PEEK));
        }

        return $message;
    }
public function getMessage($id = '')
    {
        $message = [];
        if (is_array($this->messages) == true) {
            foreach($this ->messages as $msg) {
                if ($msg['index'] == $id) {
                    $message = $msg;
                    break;
                }
            }
        }

        if (is_array($message) === true) {
            // Get the message body but do not mark as read
            $message['body'] = quoted_printable_decode(imap_fetchbody($this->conn, $message['index'], FT_PEEK));
        }

        return $message;
    }
public function getMessage ( $ id = '' ) { $ message = [ ] ; if ( is_array ( $ this -> messages ) == true ) { foreach ( $ this -> messages as $ msg ) { if ( $ msg [ 'index' ] == $ id ) { $ message = $ msg ; break ; } } } if ( is_array ( $ message ) === true ) { // Get the message body but do not mark as read $ message [ 'body' ] = quoted_printable_decode ( imap_fetchbody ( $ this -> conn , $ message [ 'index' ] , FT_PEEK ) ) ; } return $ message ; }
Return a message based on its index in the mailbox.

@param string $id

@return mixed
Return a message based on its index in the mailbox .