roundcubemail/program/lib/Roundcube/rcube_imap.php
public function get_message_headers($uid, $folder = null, $force = false)
    {
        // decode combined UID-folder identifier
        if (preg_match('/^\d+-.+/', $uid)) {
            list($uid, $folder) = explode('-', $uid, 2);
        }

        if (!strlen($folder)) {
            $folder = $this->folder;
        }

        // get cached headers
        if (!$force && $uid && ($mcache = $this->get_mcache_engine())) {
            $headers = $mcache->get_message($folder, $uid);
        }
        else if (!$this->check_connection()) {
            $headers = false;
        }
        else {
            $headers = $this->conn->fetchHeader(
                $folder, $uid, true, true, $this->get_fetch_headers());

            if (is_object($headers))
                $headers->folder = $folder;
        }

        return $headers;
    }
public function get_message_headers($uid, $folder = null, $force = false)
    {
        // decode combined UID-folder identifier
        if (preg_match('/^\d+-.+/', $uid)) {
            list($uid, $folder) = explode('-', $uid, 2);
        }

        if (!strlen($folder)) {
            $folder = $this->folder;
        }

        // get cached headers
        if (!$force && $uid && ($mcache = $this->get_mcache_engine())) {
            $headers = $mcache->get_message($folder, $uid);
        }
        else if (!$this->check_connection()) {
            $headers = false;
        }
        else {
            $headers = $this->conn->fetchHeader(
                $folder, $uid, true, true, $this->get_fetch_headers());

            if (is_object($headers))
                $headers->folder = $folder;
        }

        return $headers;
    }
public function get_message_headers ( $ uid , $ folder = null , $ force = false ) { // decode combined UID-folder identifier if ( preg_match ( '/^\d+-.+/' , $ uid ) ) { list ( $ uid , $ folder ) = explode ( '-' , $ uid , 2 ) ; } if ( ! strlen ( $ folder ) ) { $ folder = $ this -> folder ; } // get cached headers if ( ! $ force && $ uid && ( $ mcache = $ this -> get_mcache_engine ( ) ) ) { $ headers = $ mcache -> get_message ( $ folder , $ uid ) ; } else if ( ! $ this -> check_connection ( ) ) { $ headers = false ; } else { $ headers = $ this -> conn -> fetchHeader ( $ folder , $ uid , true , true , $ this -> get_fetch_headers ( ) ) ; if ( is_object ( $ headers ) ) $ headers -> folder = $ folder ; } return $ headers ; }
Return message headers object of a specific message

@param int     $id       Message UID
@param string  $folder   Folder to read from
@param bool    $force    True to skip cache

@return rcube_message_header Message headers
Return message headers object of a specific message