<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.6 $ -->
<refentry xml:id="function.mailparse-msg-extract-part-file" xmlns="http://docbook.org/ns/docbook">
 <refnamediv>
  <refname>mailparse_msg_extract_part_file</refname>
  <refpurpose>Extracts/decodes a message section</refpurpose>
 </refnamediv>
 <refsect1 role="description">
  &reftitle.description;
  <methodsynopsis>
   <type>string</type><methodname>mailparse_msg_extract_part_file</methodname>
   <methodparam><type>resource</type><parameter>mimemail</parameter></methodparam>
   <methodparam><type>mixed</type><parameter>filename</parameter></methodparam>
   <methodparam choice="opt"><type>callback</type><parameter>callbackfunc</parameter></methodparam>
  </methodsynopsis>
  <para>
   Extracts/decodes a message section from the supplied filename.
  </para>
  <para>
   The contents of the section will be decoded according to their transfer
   encoding - base64, quoted-printable and uuencoded text are supported.  
  </para>
 </refsect1>

 <refsect1 role="parameters">
  &reftitle.parameters;
  <para>
   <variablelist>
    <varlistentry>
     <term><parameter>mimemail</parameter></term>
     <listitem>
      <para>
       A valid <literal>MIME</literal> resource, created with
       <function>mailparse_msg_create</function>.
      </para>
     </listitem>
    </varlistentry>
    <varlistentry>
     <term><parameter>filename</parameter></term>
     <listitem>
      <para>
       Can be a file name or a valid stream resource.
      </para>
     </listitem>
    </varlistentry>
    <varlistentry>
     <term><parameter>callbackfunc</parameter></term>
     <listitem>
      <para>
       If set, this must be either a valid callback that will be passed the
       extracted section, or &null; to make this function return the
       extracted section.
      </para>
      <para>
       If not specified, the contents will be sent to "stdout".
      </para>
     </listitem>
    </varlistentry>
   </variablelist>
  </para>
 </refsect1>

 <refsect1 role="returnvalues">
  &reftitle.returnvalues;
  <para>
   If <parameter>callbackfunc</parameter> is not &null; returns &true; on
   success.
  </para>
  <para>
   If <parameter>callbackfunc</parameter> is set to &null;, returns the
   extracted section as a string.
  </para>
  <para>
   Returns &false; on error.
  </para>
 </refsect1>

 <refsect1 role="seealso">
  &reftitle.seealso;
  <para>
   <simplelist>
    <member><function>mailparse_msg_extract_part</function></member>
    <member><function>mailparse_msg_extract_whole_part_file</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:"../../../../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
-->