imap_fetch_overview

(PHP 3>= 3.0.4, PHP 4 )

imap_fetch_overview --  주어진 메시지 헤더의 전체 정보를 읽어 온다

Description

array imap_fetch_overview ( int imap_stream, string sequence [, int flags])

이 함수는 주어진 sequence일련번호에 대한 헤더를 페치하고, 전체 정보를 돌려준다. sequence값은 flags가 FT_UID를 갖는다면 UID나 메시지 인덱스(indices)의 일련번호(sequence)가 된다. 돌려받는 값은 메시지 헤더의 각각을 서술하는 다음과 같은 속성을 갖는 객체의 배열이다:

예 1. imap_fetch_overview() example

$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);