PHP : Function Reference : IMAP, POP3 and NNTP Functions : imap_headerinfo
scott
If you want to extract values from to, from, or other header elements, they are an object and you need to loop over them i.e.
$header = imap_header($mbox, $message_id);
$from = $header->from;
foreach ($from as $id => $object) {
$fromname = $object->personal;
$fromaddress = $object->mailbox . "@" . $object->host;
}
Would give you two variables for the friendly from and the smtp from address
Thanks to www.natrak.net for help with this
|