note 26741 added to function.imap-headerinfo

From: Date: Mon, 11 Nov 2002 15:13:11 +0000
Subject: note 26741 added to function.imap-headerinfo
Groups: php.notes 
Request: Send a blank email to php-notes+get-39297@lists.php.net to get a copy of this message
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 -- http://www.php.net/manual/en/function.imap-headerinfo.php http://master.php.net/manage/user-notes.php?action=edit+26741 http://master.php.net/manage/user-notes.php?action=delete+26741 http://master.php.net/manage/user-notes.php?action=reject+26741

« previous php.notes (#39297) next »