note 14777 added to function.imap-headers.php
| From: | dot doc at disinfo dot net | Date: | Tue, 14 Aug 2001 13:29:39 +0000 |
| Subject: | note 14777 added to function.imap-headers.php | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-16697@lists.php.net to get a copy of this message | ||
the function alone may be useless, but you could easily find a way to get your header information,
plus set up a nice user interface for checking messages:
--
$mbox = imap_open ("{your.imap.host:143}", "username", "password");
$headers = imap_headers ($mbox);
static $key = 0;
while (list ($key,$val) = each ($headers)) {
$key++;
$header = ($mbox, $key);
echo "<a href=\"read.php?msg=$key\">".$header."</a>< br
>\n";
}
--
note: for some reason my imap installation defaults to the first message as '1', while php
assumes it is '0'. that's why i altered the value of $key. your imap installation may
not be the same as mine. also remove the spaces in the 'br' tag.
http://www.php.net/manual/en/function.imap-headers.php