Sophie

Sophie

distrib > Mageia > 7 > armv7hl > by-pkgid > 2b917e0437961edec048f1d15e2d7449 > files > 4196

php-manual-en-7.2.11-1.mga7.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 an overview of the information in the headers of the given message</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.imap-expunge.html">imap_expunge</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.imap-fetchbody.html">imap_fetchbody</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-fetch-overview" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">imap_fetch_overview</h1>
  <p class="verinfo">(PHP 4, PHP 5, PHP 7)</p><p class="refpurpose"><span class="refname">imap_fetch_overview</span> &mdash; <span class="dc-title">Read an overview of the information in the headers of the given message</span></p>

 </div>
 <div class="refsect1 description" id="refsect1-function.imap-fetch-overview-description">
  <h3 class="title">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="type">array</span> <span class="methodname"><strong>imap_fetch_overview</strong></span>
    ( <span class="methodparam"><span class="type">resource</span> <code class="parameter">$imap_stream</code></span>
   , <span class="methodparam"><span class="type">string</span> <code class="parameter">$sequence</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">
   This function fetches mail headers for the given
   <code class="parameter">sequence</code> and returns an overview of their
   contents.
  </p>
 </div>

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

    <dt>
<code class="parameter">
imap_stream</code></dt>
<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>
<code class="parameter">sequence</code></dt>

     <dd>

      <p class="para">
       A message sequence description. You can enumerate desired messages
       with the <em>X,Y</em> syntax, or retrieve all messages 
       within an interval with the <em>X:Y</em> syntax
      </p>
     </dd>

    
    
     <dt>
<code class="parameter">options</code></dt>

     <dd>

      <p class="para">
       <code class="parameter">sequence</code> will contain a sequence of message
       indices or UIDs, if this parameter is set to 
       <strong><code>FT_UID</code></strong>. 
      </p>
     </dd>

    
   </dl>

  </p>
 </div>

 <div class="refsect1 returnvalues" id="refsect1-function.imap-fetch-overview-returnvalues">
  <h3 class="title">Return Values</h3>
  <p class="para">
   Returns an array of objects describing one message header each.
   The object will only define a property if it exists. The possible
   properties are:
   <ul class="itemizedlist">
    <li class="listitem">
     <span class="simpara">
      <em>subject</em> - the messages subject
     </span>
    </li>
    <li class="listitem">
     <span class="simpara">
      <em>from</em> - who sent it
     </span>
    </li>
    <li class="listitem">
     <span class="simpara">
      <em>to</em> - recipient
     </span>
    </li>
    <li class="listitem">
     <span class="simpara">
      <em>date</em> - when was it sent
     </span>
    </li>
    <li class="listitem">
     <span class="simpara">
      <em>message_id</em> - Message-ID
     </span>
    </li>
    <li class="listitem">
     <span class="simpara">
      <em>references</em> - is a reference to this message id
     </span>
    </li>
    <li class="listitem">
     <span class="simpara">
      <em>in_reply_to</em> - is a reply to this message id
     </span>
    </li>
    <li class="listitem">
     <span class="simpara">
      <em>size</em> - size in bytes
     </span>
    </li>
    <li class="listitem">
     <span class="simpara">
      <em>uid</em> - UID the message has in the mailbox
     </span>
    </li>
    <li class="listitem">
     <span class="simpara">
      <em>msgno</em> - message sequence number in the mailbox
     </span>
    </li>
    <li class="listitem">
     <span class="simpara">
      <em>recent</em> - this message is flagged as recent
     </span>
    </li>
    <li class="listitem">
     <span class="simpara">
      <em>flagged</em> -  this message is flagged
     </span>
    </li>
    <li class="listitem">
     <span class="simpara">
      <em>answered</em> -  this message is flagged as answered
     </span>
    </li>
    <li class="listitem">
     <span class="simpara">
      <em>deleted</em> -  this message is flagged for deletion
     </span>
    </li>
    <li class="listitem">
     <span class="simpara">
      <em>seen</em> -  this message is flagged as already read
     </span>
    </li>
    <li class="listitem">
     <span class="simpara">
      <em>draft</em> -  this message is flagged as being a draft
     </span>
    </li>
    <li class="listitem">
     <span class="simpara">
      <em>udate</em> -  the UNIX timestamp of the arrival date
     </span>
    </li>
   </ul>
  </p>
 </div>


 <div class="refsect1 changelog" id="refsect1-function.imap-fetch-overview-changelog">
  <h3 class="title">Changelog</h3>
  <table class="doctable informaltable">
   
    <thead>
     <tr>
      <th>Version</th>
      <th>Description</th>
     </tr>

    </thead>

    <tbody class="tbody">
     <tr>
      <td>5.3.3</td>
      <td>
       Add the <em>udate</em> property.
      </td>
     </tr>

    </tbody>
   
  </table>

 </div>


 <div class="refsect1 examples" id="refsect1-function.imap-fetch-overview-examples">
  <h3 class="title">Examples</h3>
  <p class="para">
   <div class="example" id="example-4144">
    <p><strong>Example #1 <span class="function"><strong>imap_fetch_overview()</strong></span> example</strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br />$mbox&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">imap_open</span><span style="color: #007700">(</span><span style="color: #DD0000">"{imap.example.org:143}INBOX"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"username"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"password"</span><span style="color: #007700">)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;or&nbsp;die(</span><span style="color: #DD0000">"can't&nbsp;connect:&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">imap_last_error</span><span style="color: #007700">());<br /><br /></span><span style="color: #0000BB">$MC&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">imap_check</span><span style="color: #007700">(</span><span style="color: #0000BB">$mbox</span><span style="color: #007700">);<br /><br /></span><span style="color: #FF8000">//&nbsp;Fetch&nbsp;an&nbsp;overview&nbsp;for&nbsp;all&nbsp;messages&nbsp;in&nbsp;INBOX<br /></span><span style="color: #0000BB">$result&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">imap_fetch_overview</span><span style="color: #007700">(</span><span style="color: #0000BB">$mbox</span><span style="color: #007700">,</span><span style="color: #DD0000">"1:</span><span style="color: #007700">{</span><span style="color: #0000BB">$MC</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">Nmsgs</span><span style="color: #007700">}</span><span style="color: #DD0000">"</span><span style="color: #007700">,</span><span style="color: #0000BB">0</span><span style="color: #007700">);<br />foreach&nbsp;(</span><span style="color: #0000BB">$result&nbsp;</span><span style="color: #007700">as&nbsp;</span><span style="color: #0000BB">$overview</span><span style="color: #007700">)&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"#</span><span style="color: #007700">{</span><span style="color: #0000BB">$overview</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">msgno</span><span style="color: #007700">}</span><span style="color: #DD0000">&nbsp;(</span><span style="color: #007700">{</span><span style="color: #0000BB">$overview</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">date</span><span style="color: #007700">}</span><span style="color: #DD0000">)&nbsp;-&nbsp;From:&nbsp;</span><span style="color: #007700">{</span><span style="color: #0000BB">$overview</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">from</span><span style="color: #007700">}</span><span style="color: #DD0000"><br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">{</span><span style="color: #0000BB">$overview</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">subject</span><span style="color: #007700">}</span><span style="color: #DD0000">\n"</span><span style="color: #007700">;<br />}<br /></span><span style="color: #0000BB">imap_close</span><span style="color: #007700">(</span><span style="color: #0000BB">$mbox</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</code></div>
    </div>

   </div>
  </p>
 </div>

 <div class="refsect1 seealso" id="refsect1-function.imap-fetch-overview-seealso">
  <h3 class="title">See Also</h3>
  <p class="para">
   <ul class="simplelist">
    <li class="member"><span class="function"><a href="function.imap-fetchheader.html" class="function" rel="rdfs-seeAlso">imap_fetchheader()</a> - Returns header for a 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-expunge.html">imap_expunge</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.imap-fetchbody.html">imap_fetchbody</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>