protected function getMessageHeader($id) {
        $count = $this->countMessages();
        for ($i=1;$i<=$count;$i++) {
            $uid = imap_uid($this->imap, $i);
            if ($uid==$id) {
                $header = imap_headerinfo($this->imap, $i);
                return $header;
            }
        }
        return false;
    }
protected function getMessageHeader($id) {
        $count = $this->countMessages();
        for ($i=1;$i<=$count;$i++) {
            $uid = imap_uid($this->imap, $i);
            if ($uid==$id) {
                $header = imap_headerinfo($this->imap, $i);
                return $header;
            }
        }
        return false;
    }
protected function getMessageHeader ( $ id ) { $ count = $ this -> countMessages ( ) ; for ( $ i = 1 ; $ i <= $ count ; $ i ++ ) { $ uid = imap_uid ( $ this -> imap , $ i ) ; if ( $ uid == $ id ) { $ header = imap_headerinfo ( $ this -> imap , $ i ) ; return $ header ; } } return false ; }
Fetch message by id

@param int $id of the message
@return false|object header
Fetch message by id