note 118113 added to function.imap-fetch-overview
| From: | Ap.Muthu | Date: | Tue, 06 Oct 2015 11:31:46 +0000 |
| Subject: | note 118113 added to function.imap-fetch-overview | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-203916@lists.php.net to get a copy of this message | ||
The use of the $range parameter is explained in the example at: http://www.phpdig.net/ref/rn31re596.html
<?php
$imap = imap_open("{localhost}INBOX","graeme","inferno");
// fetch message information for message 2
// and messages 4 to 6
$info = imap_fetch_overview($imap, "2,4:6");
?>
<table border=1>
<tr><th>Read</th><th>From</th><th>Date</th><th>Subject</th></tr>
<?php
// loop through the array
foreach ($info as $msg) {
echo "<tr>";
// display the seen property nicely
if ($msg->seen == 1) {
$read = "Yes";
} else {
$read = "No";
}
// print other message information
printf("<td>%s</td>", $read);
printf("<td>%s</td>", $msg->from);
printf("<td>%s</td>", $msg->date);
printf("<td>%s</td>", $msg->subject);
}
imap_close($imap);
?>
----
Server IP: 72.52.91.14
Probable Submitter: 117.193.8.254
----
Manual Page -- http://php.net/manual/en/function.imap-fetch-overview.php
Edit -- https://master.php.net/note/edit/118113
Del: integrated -- https://master.php.net/note/delete/118113/integrated
Del: useless -- https://master.php.net/note/delete/118113/useless
Del: bad code -- https://master.php.net/note/delete/118113/bad+code
Del: spam -- https://master.php.net/note/delete/118113/spam
Del: non-english -- https://master.php.net/note/delete/118113/non-english
Del: in docs -- https://master.php.net/note/delete/118113/in+docs
Del: other reasons-- https://master.php.net/note/delete/118113
Reject -- https://master.php.net/note/reject/118113
Search -- https://master.php.net/manage/user-notes.php