imap_headerinfo
imap_headerinfo
(PHP 4, PHP 5, PHP 7)
imap_headerinfo — Read the header of the message
Description
object imap_headerinfo ( resource $imap_stream , int $msg_number [, int $fromlength = 0 [, int $subjectlength = 0 [, string $defaulthost = NULL ]]] )
Gets information about the given message number by reading its headers.
Parameters
`imap_stream`
An IMAP stream returned by imap_open().
msg_number
The message number
fromlength
Number of characters for the fetchfrom
property. Must be greater than or equal to zero.
subjectlength
Number of characters for the fetchsubject
property Must be greater than or equal to zero.
defaulthost
Return Values
Returns FALSE
on error or, if successful, the information in an object with following properties:
- toaddress - full to: line, up to 1024 characters
- to - an array of objects from the To: line, with the following properties:
personal
,adl
,mailbox
, andhost
- fromaddress - full from: line, up to 1024 characters
- from - an array of objects from the From: line, with the following properties:
personal
,adl
,mailbox
, andhost
- ccaddress - full cc: line, up to 1024 characters
- cc - an array of objects from the Cc: line, with the following properties:
personal
,adl
,mailbox
, andhost
- bccaddress - full bcc: line, up to 1024 characters
- bcc - an array of objects from the Bcc: line, with the following properties:
personal
,adl
,mailbox
, andhost
- reply_toaddress - full Reply-To: line, up to 1024 characters
- reply_to - an array of objects from the Reply-To: line, with the following properties:
personal
,adl
,mailbox
, andhost
- senderaddress - full sender: line, up to 1024 characters
- sender - an array of objects from the Sender: line, with the following properties:
personal
,adl
,mailbox
, andhost
- return_pathaddress - full Return-Path: line, up to 1024 characters
- return_path - an array of objects from the Return-Path: line, with the following properties:
personal
,adl
,mailbox
, andhost
- remail -
- date - The message date as found in its headers
- Date - Same as date
- subject - The message subject
- Subject - Same as subject
- in_reply_to -
- message_id -
- newsgroups -
- followup_to -
- references -
R
ecent -R
if recent and seen,N
if recent and not seen, ' ' if not recent.
U
nseen -U
if not seen AND not recent, ' ' if seen OR not seen and recent
F
lagged -F
if flagged, ' ' if not flagged
A
nswered -A
if answered, ' ' if unanswered
D
eleted -D
if deleted, ' ' if not deleted
- Draft -
X
if draft, ' ' if not draft
- Msgno - The message number
- MailDate -
- Size - The message size
- udate - mail message date in Unix time
- fetchfrom - from line formatted to fit
fromlength
characters
- fetchsubject - subject line formatted to fit
subjectlength
characters
See Also
- imap_fetch_overview() - Read an overview of the information in the headers of the given message
← imap_header
imap_headers →
© 1997–2017 The PHP Documentation Group
Licensed under the Creative Commons Attribution License v3.0 or later.
https://secure.php.net/manual/en/function.imap-headerinfo.php