Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

imap_headerinfo(3) [php man page]

IMAP_HEADERINFO(3)							 1							IMAP_HEADERINFO(3)

imap_headerinfo - Read the header of the message

SYNOPSIS
object imap_headerinfo NULL (resource $imap_stream, int $msg_number, [int $fromlength], [int $subjectlength], [string $defaulthost]) DESCRIPTION
Gets information about the given message number by reading its headers. PARAMETERS
o $ imap_stream -An IMAP stream returned by imap_open(3). o $msg_number - The message number o $fromlength - Number of characters for the fetchfrom property. Must be greater than or equal to zero. o $subjectlength - Number of characters for the fetchsubject property Must be greater than or equal to zero. o $defaulthost - RETURN VALUES
Returns the information in an object with following properties: o toaddress - full to: line, up to 1024 characters o to - an array of objects from the To: line, with the following properties: personal, adl, mailbox, and host o fromaddress - full from: line, up to 1024 characters o from - an array of objects from the From: line, with the following properties: personal, adl, mailbox, and host o ccaddress - full cc: line, up to 1024 characters o cc - an array of objects from the Cc: line, with the following properties: personal, adl, mailbox, and host o bccaddress - full bcc: line, up to 1024 characters o bcc - an array of objects from the Bcc: line, with the following properties: personal, adl, mailbox, and host o reply_toaddress - full Reply-To: line, up to 1024 characters o reply_to - an array of objects from the Reply-To: line, with the following properties: personal, adl, mailbox, and host o senderaddress - full sender: line, up to 1024 characters o sender - an array of objects from the Sender: line, with the following properties: personal, adl, mailbox, and host o return_pathaddress - full Return-Path: line, up to 1024 characters o return_path - an array of objects from the Return-Path: line, with the following properties: personal, adl, mailbox, and host o remail - o date - The message date as found in its headers o Date - Same as date o subject - The message subject o Subject - Same as subject o in_reply_to - o message_id - o newsgroups - o followup_to - o references - o Recent - R if recent and seen, N if recent and not seen, ' ' if not recent. o Unseen - U if not seen AND not recent, ' ' if seen OR not seen and recent o Flagged - F if flagged, ' ' if not flagged o Answered - A if answered, ' ' if unanswered o Deleted - D if deleted, ' ' if not deleted o Draft - X if draft, ' ' if not draft o Msgno - The message number o MailDate - o Size - The message size o udate - mail message date in Unix time o fetchfrom - from line formatted to fit $fromlength characters o fetchsubject - subject line formatted to fit $subjectlength characters SEE ALSO
imap_fetch_overview(3). PHP Documentation Group IMAP_HEADERINFO(3)

Check Out this Related Man Page

IMAP_STATUS(3)								 1							    IMAP_STATUS(3)

imap_status - Returns status information on a mailbox

SYNOPSIS
object imap_status (resource $imap_stream, string $mailbox, int $options) DESCRIPTION
Gets status information about the given $mailbox. PARAMETERS
o $ imap_stream -An IMAP stream returned by imap_open(3). o $mailbox - The mailbox name, see imap_open(3) for more information o $options - Valid flags are: o SA_MESSAGES - set $status->messages to the number of messages in the mailbox o SA_RECENT - set $status->recent to the number of recent messages in the mailbox o SA_UNSEEN - set $status->unseen to the number of unseen (new) messages in the mailbox o SA_UIDNEXT - set $status->uidnext to the next uid to be used in the mailbox o SA_UIDVALIDITY - set $status->uidvalidity to a constant that changes when uids for the mailbox may no longer be valid o SA_ALL - set all of the above RETURN VALUES
This function returns an object containing status information. The object has the following properties: messages, recent, unseen, uidnext, and uidvalidity. flags is also set, which contains a bitmask which can be checked against any of the above constants. EXAMPLES
Example #1 imap_status(3) example <?php $mbox = imap_open("{imap.example.com}", "username", "password", OP_HALFOPEN) or die("can't connect: " . imap_last_error()); $status = imap_status($mbox, "{imap.example.org}INBOX", SA_ALL); if ($status) { echo "Messages: " . $status->messages . "<br /> "; echo "Recent: " . $status->recent . "<br /> "; echo "Unseen: " . $status->unseen . "<br /> "; echo "UIDnext: " . $status->uidnext . "<br /> "; echo "UIDvalidity:" . $status->uidvalidity . "<br /> "; } else { echo "imap_status failed: " . imap_last_error() . " "; } imap_close($mbox); ?> PHP Documentation Group IMAP_STATUS(3)
Man Page