PHP: imap_headerinfo - Manual

downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

imap_headers imap_header

Last updated: Fri, 26 Jan 2007

view this page in

# imap_headerinfo

(PHP 3, PHP 4, PHP 5)

imap_headerinfo -- Read the header of the message

## Описание

object imap_headerinfo ( resource imap_stream, int msg_number [, int fromlength [, int subjectlength [, string defaulthost]]] )

Gets information about the given message number by reading its headers.

## Список параметров

`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`

## Возвращаемые значения

Returns 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`, and `host`

- fromaddress - full from: line, up to 1024 characters

- from - an array of objects from the From: line, with the following properties: `personal`, `adl`, `mailbox`, and `host`

- ccaddress - full cc: line, up to 1024 characters

- cc - an array of objects from the Cc: line, with the following properties: `personal`, `adl`, `mailbox`, and `host`

- bccaddress - full bcc: line, up to 1024 characters

- bcc - an array of objects from the Bcc: line, with the following properties: `personal`, `adl`, `mailbox`, and `host`

- 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`, and `host`

- senderaddress - full sender: line, up to 1024 characters

- sender - an array of objects from the Sender: line, with the following properties: `personal`, `adl`, `mailbox`, and `host`

- 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`, and `host`

- remail -

- date - The message date as found in its headers

- Date - Same as date

- subject - The message subject

- Subject - Same a subject

- in_reply_to -

- message_id -

- newsgroups -

- followup_to -

- references -

- Recent - `R` if recent and seen, `N` if recent and not seen, ' ' if not recent.

- Unseen - `U` if not seen AND not recent, ' ' if seen OR not seen and recent

- Flagged - `F` if flagged,, ' ' if not flagged

- Answered - `A` if answered, ' ' if unanswered

- Deleted - `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

## Смотрите также

imap_fetch_overview()

add a note User Contributed Notes
imap_headerinfo
scott at fuzzygroup dot com
11-Nov-2002 09:13
`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`
add a note
imap_headers imap_header

Last updated: Fri, 26 Jan 2007
show source | credits | stats | sitemap | contact | advertising | mirror sites
Copyright © 2001-2007 The PHP Group
All rights reserved.
This mirror generously provided by: Yahoo! Inc.
Last updated: Sat Mar 10 09:32:46 2007 PST