note 14777 deleted from function.imap-headers by jimw

From: Date: Sat, 08 Dec 2001 23:47:59 +0000
Subject: note 14777 deleted from function.imap-headers by jimw
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-22377@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.

« previous php.notes (#22377) next »