imap_fetch_overview

(PHP3 >= 3.0.4, PHP4 )

imap_fetch_overview --  Read an overview of the information in the headers of the given message

Description

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

This function fetches mail headers for the given sequence and returns an overview of their contents. sequence will contain a sequence of message indices or UIDs, if flags contains FT_UID. The returned value is an array of objects describing one message header each:

Példa 1. imap_fetch_overview() example

  1 
  2 $mbox = imap_open("{your.imap.host:143}","username","password")
  3      || die("can't connect: ".imap_last_error());
  4  
  5 $overview = imap_fetch_overview($mbox,"2,4:6",0);
  6  
  7 if(is_array($overview)) {
  8         reset($overview);
  9         while( list($key,$val) = each($overview)) {
 10                 print     $val->msgno
 11                 . " - " . $val->date
 12                 . " - " . $val->subject
 13                 . "\n";
 14         }
 15 }
 16  
 17 imap_close($mbox);
 18