imap_fetch_overview

(PHP 3>= 3.0.4, PHP 4 >= 4.0.0)

imap_fetch_overview --  指定したメッセージのヘッダ情報の概要を読む

説明

array imap_fetch_overview (int imap_stream, string sequence)

この関数はメールヘッダを取得し、その内容の概要を返します。 オブジェクトの配列を返します。 各ヘッダを次のように記述するオブジェクトの配列を返します。

例 1imap_fetch_overview() の例


$mbox = imap_open ("{your.imap.host:143}","username","password")
     || die("can't connect: ".imap_last_error());
 
$overview = imap_fetch_overview ($mbox,"2,4:6",0);
 
if(is_array($overview)) {
        reset($overview);
        while( list($key,$val) = each($overview)) {
                print     $val->msgno
                . " - " . $val->date
                . " - " . $val->subject
                . "\n";
        }
}
 
imap_close ($mbox);