note 33489 deleted from function.imap-header by didou
| From: | didou@php.net | Date: | Sun, 14 Jan 2007 23:35:10 +0000 |
| Subject: | note 33489 deleted from function.imap-header by didou | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-121665@lists.php.net to get a copy of this message | ||
Note Submitter: chorkt
----
i was having a hard time with the notes on the page but this works... It's simply getting out
the e-mail address from the header
for ($i = 1; $i <= imap_num_msg($mbox); $i++)
{
$header = imap_headerinfo($mbox, $i, 80, 80);
$fromaddress[$i] = $header->from[0]->host;
$fromname[$i] = $header->from[0]->mailbox;
$from[$i]= $fromname[$i]."@".$fromaddress[$i];
$subject[$i] = $header->fetchsubject;
print "<br>".$from[$i]." ".$subject[$i]." \n ";
}