PHP IMAP_HEADERINFO problem getting all 'to' addresses.
| From: | Brent | Date: | Wed, 09 Jun 2004 06:56:14 +0000 |
| Subject: | PHP IMAP_HEADERINFO problem getting all 'to' addresses. | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-23940@lists.php.net to get a copy of this message | ||
Hi Group,
I am using IMAP to access a POP3 mailbox.
Everything works fine but I cannot seem to get all the to: emails. I ref the
to[0] to get the 1st one and that works fine.
But I cannot seem to get the to[1] or to[2] etc values. It works fine for
the cc: array but not the to: array.
I'm using PHP on a windows platform using IIS. Anyone else ever had this
problem. Please see code below.
The code below just looks for 4 to: emails addresses etc.
$mbox = imap_open ("{$mboxip:$mboxport/pop3}INBOX", "$mboxuname",
"$mboxpass") or die("Could not open Mailbox - try again later!");
$tsthead=imap_headerinfo ($mbox,5);
$tom=$tsthead->to;
for ($i = 0; $i <= 3; i++)
{
echo"<br>pfrom :";echo$tom[$i]->personal;
echo"<br>mbfrom :";echo$tom[$i]->mailbox;
echo"<br>adlfrom :";echo$tom[$i]->adl;
echo"<br>hostfrom :";echo$tom[$i]->host;
}
Thanks Heaps,
Brent.