Sophie

Sophie

distrib > Mageia > 4 > x86_64 > by-pkgid > f800694edefe91adea2624f711a41a2d > files > 3759

php-manual-en-5.5.7-1.mga4.noarch.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Read the structure of a particular message</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.imap-fetchmime.html">imap_fetchmime</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.imap-fetchtext.html">imap_fetchtext</a></div>
 <div class="up"><a href="ref.imap.html">IMAP Functions</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="function.imap-fetchstructure" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">imap_fetchstructure</h1>
  <p class="verinfo">(PHP 4, PHP 5)</p><p class="refpurpose"><span class="refname">imap_fetchstructure</span> &mdash; <span class="dc-title">Read the structure of a particular message</span></p>

 </div>
 <div class="refsect1 description" id="refsect1-function.imap-fetchstructure-description">
  <h3 class="title">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="type">object</span> <span class="methodname"><strong>imap_fetchstructure</strong></span>
    ( <span class="methodparam"><span class="type">resource</span> <code class="parameter">$imap_stream</code></span>
   , <span class="methodparam"><span class="type">int</span> <code class="parameter">$msg_number</code></span>
   [, <span class="methodparam"><span class="type">int</span> <code class="parameter">$options</code><span class="initializer"> = 0</span></span>
  ] )</div>

  <p class="para rdfs-comment">
   Fetches all the structured information for a given message. 
  </p>
 </div>

 <div class="refsect1 parameters" id="refsect1-function.imap-fetchstructure-parameters">
  <h3 class="title">Parameters</h3>
  <p class="para">
   <dl>

    <dt>
<span class="term"><em><code class="parameter">
imap_stream</code></em></span><dd>
<p class="para">An IMAP stream returned by
 <span class="function"><a href="function.imap-open.html" class="function">imap_open()</a></span>.</p></dd>
</dt>

    <dt>

     <span class="term"><em><code class="parameter">msg_number</code></em></span>
     <dd>

      <p class="para">
       The message number
      </p>
     </dd>

    </dt>

    <dt>

     <span class="term"><em><code class="parameter">options</code></em></span>
     <dd>

      <p class="para">
       This optional parameter only has a single option, 
       <strong><code>FT_UID</code></strong>, which tells the function to treat the
       <em><code class="parameter">msg_number</code></em> argument as a 
       <em>UID</em>.
      </p>
     </dd>

    </dt>

   </dl>

  </p>
 </div>

 <div class="refsect1 returnvalues" id="refsect1-function.imap-fetchstructure-returnvalues">
  <h3 class="title">Return Values</h3>
  <p class="para">
   Returns an object includes the envelope, internal date, size, flags and
   body structure along with a similar object for each mime attachment. The
   structure of the returned objects is as follows:
  </p>
  <p class="para">
   <table class="doctable table">
    <caption><strong>
     Returned Objects for  <span class="function"><strong>imap_fetchstructure()</strong></span>
    </strong></caption>
    
     <tbody class="tbody">
      <tr>
       <td>type</td>
       <td>Primary body type</td>
      </tr>

      <tr>
       <td>encoding</td>
       <td>Body transfer encoding</td>
      </tr>

      <tr>
       <td>ifsubtype</td>
       <td><strong><code>TRUE</code></strong> if there is a subtype string</td>
      </tr>

      <tr>
       <td>subtype</td>
       <td><acronym title="Multipurpose Internet Mail Extensions">MIME</acronym> subtype</td>
      </tr>

      <tr>
       <td>ifdescription</td>
       <td><strong><code>TRUE</code></strong> if there is a description string</td>
      </tr>

      <tr>
       <td>description</td>
       <td>Content description string</td>
      </tr>

      <tr>
       <td>ifid</td>
       <td><strong><code>TRUE</code></strong> if there is an identification string</td>
      </tr>

      <tr>
       <td>id</td>
       <td>Identification string</td>
      </tr>

      <tr>
       <td>lines</td>
       <td>Number of lines</td>
      </tr>

      <tr>
       <td>bytes</td>
       <td>Number of bytes</td>
      </tr>

      <tr>
       <td>ifdisposition</td>
       <td><strong><code>TRUE</code></strong> if there is a disposition string</td>
      </tr>

      <tr>
       <td>disposition</td>
       <td>Disposition string</td>
      </tr>

      <tr>
       <td>ifdparameters</td>
       <td><strong><code>TRUE</code></strong> if the <var class="varname"><var class="varname">dparameters</var></var> array exists</td>
      </tr>

      <tr>
       <td>dparameters</td>
       <td>An array of objects where each object has an
        <em>&quot;attribute&quot;</em> and a <em>&quot;value&quot;</em>
        property corresponding to the parameters on the
        <em>Content-disposition</em> <acronym title="Multipurpose Internet Mail Extensions">MIME</acronym>
        header.</td>
      </tr>

      <tr>
       <td>ifparameters</td>
       <td><strong><code>TRUE</code></strong> if the parameters array exists</td>
      </tr>

      <tr>
       <td>parameters</td>
       <td>An array of objects where each object has an
        <em>&quot;attribute&quot;</em> and a <em>&quot;value&quot;</em>
        property.</td>
      </tr>

      <tr>
       <td>parts</td>
       <td>An array of objects identical in structure to the top-level
       object, each of which corresponds to a <acronym title="Multipurpose Internet Mail Extensions">MIME</acronym> body
       part.</td>
      </tr>

     </tbody>
    
   </table>

  </p>
  <p class="para">
   <table class="doctable table">
     <caption><strong>Primary body type (may vary with used library)</strong></caption>
     
      <tbody class="tbody">
      <tr><td>0</td><td>text</td></tr>

      <tr><td>1</td><td>multipart</td></tr>

      <tr><td>2</td><td>message</td></tr>

      <tr><td>3</td><td>application</td></tr>

      <tr><td>4</td><td>audio</td></tr>

      <tr><td>5</td><td>image</td></tr>

      <tr><td>6</td><td>video</td></tr>

      <tr><td>7</td><td>other</td></tr>

      </tbody>
     
   </table>

  </p>
  <p class="para">
   <table class="doctable table">
     <caption><strong>Transfer encodings (may vary with used library)</strong></caption>
     
      <tbody class="tbody">
      <tr><td>0</td><td>7BIT</td></tr>

      <tr><td>1</td><td>8BIT</td></tr>

      <tr><td>2</td><td>BINARY</td></tr>

      <tr><td>3</td><td>BASE64</td></tr>

      <tr><td>4</td><td>QUOTED-PRINTABLE</td></tr>

      <tr><td>5</td><td>OTHER</td></tr>

     </tbody>
    
   </table>

  </p>
 </div>

 <div class="refsect1 seealso" id="refsect1-function.imap-fetchstructure-seealso">
  <h3 class="title">See Also</h3>
  <p class="para">
   <ul class="simplelist">
    <li class="member"> <span class="function"><a href="function.imap-fetchbody.html" class="function" rel="rdfs-seeAlso">imap_fetchbody()</a> - Fetch a particular section of the body of the message</span></li>
    <li class="member"> <span class="function"><a href="function.imap-bodystruct.html" class="function" rel="rdfs-seeAlso">imap_bodystruct()</a> - Read the structure of a specified body section of a specific message</span></li>
   </ul>
  </p>
 </div>

</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.imap-fetchmime.html">imap_fetchmime</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.imap-fetchtext.html">imap_fetchtext</a></div>
 <div class="up"><a href="ref.imap.html">IMAP Functions</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>