PHP 8.5.0 Alpha 1 available for testing

Voting

: five plus two?
(Example: nine)

The Note You're Voting On

php at our-software dot com
8 years ago
Please Note : imap_headerinfo only returns a subset of the headers, rather than the entire thing.

Among other things, this means it only shows the first recipient from the "to" section of the email, rather than all recipients.

If you're not seeing something you expected to, you'll be better off using

$hdr_raw = imap_fetchheader($mbox, $mailid);
$hdr = imap_rfc822_parse_headers($hdr_raw);

then you'll see the full set of headers, and be able to do more with it.

<< Back to user notes page

To Top