2 Test imap_fetch_overview() function : basic functionality
5 require_once(dirname(__FILE__).'/skipif.inc');
9 /* Prototype : array imap_fetch_overview(resource $stream_id, int $msg_no [, int $options])
10 * Description: Read an overview of the information in the headers
11 * of the given message sequence
12 * Source code: ext/imap/php_imap.c
15 echo "*** Testing imap_fetch_overview() : basic functionality ***\n";
17 require_once(dirname(__FILE__).'/imap_include.inc');
19 // create a new mailbox and add two new messages to it
20 $stream_id = setup_test_mailbox('', 2, $mailbox, 'notSimple');
22 // get UID for new message
23 $msg_no = imap_uid($stream_id, 1);
26 // Calling imap_fetch_overview() with all possible arguments
27 echo "\n-- All possible arguments --\n";
28 $a = imap_fetch_overview($stream_id, "$msg_no", $options) ;
29 echo "\n--> Object #1\n";
30 displayOverviewFields($a[0]);
32 // Calling imap_fetch_overview() with mandatory arguments
33 echo "\n-- Mandatory arguments --\n";
34 $a = imap_fetch_overview($stream_id, '1:2') ;
36 //first object in array
37 echo "\n--> Object #1\n";
38 displayOverviewFields($a[0]);
40 //Second object in array
41 echo "\n--> Object #2\n";
42 displayOverviewFields($a[1]);
44 imap_close($stream_id);
50 require_once(dirname(__FILE__).'/clean.inc');
53 *** Testing imap_fetch_overview() : basic functionality ***
54 Create a temporary mailbox and add 2 msgs
55 .. mailbox '{%s}%s' created
57 -- All possible arguments --
71 -- Mandatory arguments --