<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xml:id="function.imap-headerinfo" xmlns="http://docbook.org/ns/docbook">
 <refnamediv>
  <refname>imap_headerinfo</refname>
  <refpurpose>Read the header of the message</refpurpose>
 </refnamediv>
 <refsect1 role="description">
  &reftitle.description;
  <methodsynopsis>
   <type class="union"><type>stdClass</type><type>false</type></type><methodname>imap_headerinfo</methodname>
   <methodparam><type>IMAP\Connection</type><parameter>imap</parameter></methodparam>
   <methodparam><type>int</type><parameter>message_num</parameter></methodparam>
   <methodparam choice="opt"><type>int</type><parameter>from_length</parameter><initializer>0</initializer></methodparam>
   <methodparam choice="opt"><type>int</type><parameter>subject_length</parameter><initializer>0</initializer></methodparam>
  </methodsynopsis>
  <para>
   Gets information about the given message number by reading its headers.
  </para>
 </refsect1>
 <refsect1 role="parameters">
  &reftitle.parameters;
  <para>
   <variablelist>
    &imap.imap-parameter.imap;
    <varlistentry>
     <term><parameter>message_num</parameter></term>
     <listitem>
      <para>
       The message number
      </para>
     </listitem>
    </varlistentry>
    <varlistentry>
     <term><parameter>from_length</parameter></term>
     <listitem>
      <para>
       Number of characters for the <literal>fetchfrom</literal> property.
       Must be greater than or equal to zero.
      </para>
     </listitem>
    </varlistentry>
    <varlistentry>
     <term><parameter>subject_length</parameter></term>
     <listitem>
      <para>
       Number of characters for the <literal>fetchsubject</literal> property
       Must be greater than or equal to zero.
      </para>
     </listitem>
    </varlistentry>
    <varlistentry>
     <term><parameter>defaulthost</parameter></term>
     <listitem>
      <para>
      </para>
     </listitem>
    </varlistentry>
   </variablelist>
  </para>
 </refsect1>
 <refsect1 role="returnvalues">
  &reftitle.returnvalues;
  <para>
   Returns &false; on error or, if successful, the information in an object with following properties:
   <itemizedlist>
    <listitem>
     <simpara>
      toaddress - full to: line, up to 1024 characters
     </simpara>
    </listitem>
    <listitem>
     <simpara>
      to - an array of objects from the To: line, with the following 
      properties: <literal>personal</literal>, <literal>adl</literal>,
      <literal>mailbox</literal>, and <literal>host</literal>
     </simpara>
    </listitem>
    <listitem>
     <simpara>
      fromaddress - full from: line, up to 1024 characters
     </simpara>
    </listitem>
    <listitem>
     <simpara>
      from - an array of objects from the From: line, with the following 
      properties: <literal>personal</literal>, <literal>adl</literal>,
      <literal>mailbox</literal>, and <literal>host</literal>
     </simpara>
    </listitem>
    <listitem>
     <simpara>
      ccaddress - full cc: line, up to 1024 characters
     </simpara>
    </listitem>
    <listitem>
     <simpara>
      cc - an array of objects from the Cc: line, with the following 
      properties: <literal>personal</literal>, <literal>adl</literal>,
      <literal>mailbox</literal>, and <literal>host</literal>
     </simpara>
    </listitem>
    <listitem>
     <simpara>
      bccaddress - full bcc: line, up to 1024 characters
     </simpara>
    </listitem>
    <listitem>
     <simpara>
      bcc - an array of objects from the Bcc: line, with the following 
      properties: <literal>personal</literal>, <literal>adl</literal>,
      <literal>mailbox</literal>, and <literal>host</literal>
     </simpara>
    </listitem>
    <listitem>
     <simpara>
      reply_toaddress - full Reply-To: line, up to 1024 characters
     </simpara>
    </listitem>
    <listitem>
     <simpara>
      reply_to - an array of objects from the Reply-To: line, with the following
      properties: <literal>personal</literal>, <literal>adl</literal>,
      <literal>mailbox</literal>, and <literal>host</literal>
     </simpara>
    </listitem>
    <listitem>
     <simpara>
      senderaddress - full sender: line, up to 1024 characters
     </simpara>
    </listitem>
    <listitem>
     <simpara>
      sender - an array of objects from the Sender: line, with the following 
      properties: <literal>personal</literal>, <literal>adl</literal>,
      <literal>mailbox</literal>, and <literal>host</literal>
     </simpara>
    </listitem>
    <listitem>
     <simpara>
      return_pathaddress - full Return-Path: line, up to 1024 characters
     </simpara>
    </listitem>
    <listitem>
     <simpara>
      return_path - an array of objects from the Return-Path: line, with the
      following properties: <literal>personal</literal>, 
      <literal>adl</literal>, <literal>mailbox</literal>, and 
      <literal>host</literal>
     </simpara>
    </listitem>
    <listitem>
     <simpara>
      remail - 
     </simpara>
    </listitem>
    <listitem>
     <simpara>
      date - The message date as found in its headers
     </simpara>
    </listitem>
    <listitem>
     <simpara>
      Date - Same as date
     </simpara>
    </listitem>
    <listitem>
     <simpara>
      subject - The message subject
     </simpara>
    </listitem>
    <listitem>
     <simpara>
      Subject - Same as subject 
     </simpara>
    </listitem>
    <listitem>
     <simpara>
      in_reply_to - 
     </simpara>
    </listitem>
    <listitem>
     <simpara>
      message_id - 
     </simpara>
    </listitem>
    <listitem>
     <simpara>
      newsgroups - 
     </simpara>
    </listitem>
    <listitem>
     <simpara>
      followup_to - 
     </simpara>
    </listitem>
    <listitem>
     <simpara>
      references - 
     </simpara>
    </listitem>
    <listitem>
     <simpara>
      Recent - <literal>R</literal> if recent and seen, <literal>N</literal>
      if recent and not seen, ' ' if not recent.
     </simpara>
    </listitem>
    <listitem>
     <simpara>
      Unseen - <literal>U</literal> if not seen AND not recent, ' ' if seen
      OR not seen and recent
     </simpara>
    </listitem>
    <listitem>
     <simpara>
      Flagged - <literal>F</literal> if flagged, ' ' if not flagged
     </simpara>
    </listitem>
    <listitem>
     <simpara>
      Answered - <literal>A</literal> if answered, ' ' if unanswered
     </simpara>
    </listitem>
    <listitem>
     <simpara>
      Deleted - <literal>D</literal> if deleted, ' ' if not deleted
     </simpara>
    </listitem>
    <listitem>
     <simpara>
      Draft - <literal>X</literal> if draft, ' ' if not draft
     </simpara>
    </listitem>
    <listitem>
     <simpara>
      Msgno - The message number
     </simpara>
    </listitem>
    <listitem>
     <simpara>
      MailDate - 
     </simpara>
    </listitem>
    <listitem>
     <simpara>
      Size - The message size
     </simpara>
    </listitem>
    <listitem>
     <simpara>
      udate - mail message date in Unix time
     </simpara>
    </listitem>
    <listitem>
     <simpara>
      fetchfrom - from line formatted to fit <parameter>from_length</parameter>
      characters
     </simpara>
    </listitem>
    <listitem>
     <simpara>
      fetchsubject - subject line formatted to fit 
      <parameter>subject_length</parameter> characters
     </simpara>
    </listitem>
   </itemizedlist>
  </para>
 </refsect1>

 <refsect1 role="changelog">
  &reftitle.changelog;
  <informaltable>
   <tgroup cols="2">
    <thead>
     <row>
      <entry>&Version;</entry>
      <entry>&Description;</entry>
     </row>
    </thead>
    <tbody>
     &imap.changelog.imap-param;
     <row>
      <entry>8.0.0</entry>
      <entry>
       The unused <parameter>defaulthost</parameter> parameter has been removed.
      </entry>
     </row>
    </tbody>
   </tgroup>
  </informaltable>
 </refsect1>

 <refsect1 role="seealso">
  &reftitle.seealso;
  <para>
   <simplelist>
    <member><function>imap_fetch_overview</function></member>
   </simplelist>
  </para>
 </refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->
