imap_headerinfo
(PHP 4, PHP 5, PHP 7, PHP 8)
imap_headerinfo — Read the header of the message
說明
imap_headerinfo(
IMAP\Connection
int
int
int
): stdClass|false
IMAP\Connection
$imap,int
$message_num,int
$from_length = 0,int
$subject_length = 0): stdClass|false
Gets information about the given message number by reading its headers.
參數
-
imap -
IMAP\Connection 實例。
-
message_num -
The message number
-
from_length -
Number of characters for the
fetchfromproperty. Must be greater than or equal to zero. -
subject_length -
Number of characters for the
fetchsubjectproperty Must be greater than or equal to zero. -
defaulthost -
返回值
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 -
-
Recent -
Rif recent and seen,Nif recent and not seen, ' ' if not recent. -
Unseen -
Uif not seen AND not recent, ' ' if seen OR not seen and recent -
Flagged -
Fif flagged, ' ' if not flagged -
Answered -
Aif answered, ' ' if unanswered -
Deleted -
Dif deleted, ' ' if not deleted -
Draft -
Xif 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
from_lengthcharacters -
fetchsubject - subject line formatted to fit
subject_lengthcharacters
更新日誌
| 版本 | 說明 |
|---|---|
| 8.1.0 |
現在 imap 參數接受 IMAP\Connection
實例,之前接受 資源(resource)。
|
| 8.0.0 |
The unused defaulthost parameter has been removed.
|