mirror of
https://github.com/fofolee/uTools-Manuals.git
synced 2025-06-18 22:06:57 +08:00
223 lines
9.7 KiB
HTML
223 lines
9.7 KiB
HTML
<!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 class="docs"><div id="layout">
|
|
<div id="layout-content"><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> — <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">说明</h3>
|
|
<div class="methodsynopsis dc-description">
|
|
<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>
|
|
] ) : <span class="type">array</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">参数</h3>
|
|
<p class="para">
|
|
<dl>
|
|
|
|
<dt>
|
|
<code class="parameter">
|
|
imap_stream</code></dt>
|
|
<dd>
|
|
<p class="para">由 <span class="function"><a href="imap_open.html" class="function">imap_open()</a></span> 返回的 IMAP 流。</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">返回值</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">更新日志</h3>
|
|
<table class="doctable informaltable">
|
|
|
|
<thead>
|
|
<tr>
|
|
<th>版本</th>
|
|
<th>说明</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">范例</h3>
|
|
<p class="para">
|
|
<div class="example" id="example-4019">
|
|
<p><strong>Example #1 <span class="function"><strong>imap_fetch_overview()</strong></span> example</strong></p>
|
|
<div class="example-contents">
|
|
<div class="phpcode"><pre><span style="color: #000000">
|
|
<span style="color: #0000BB"><?php<br />$mbox </span><span style="color: #007700">= </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">, </span><span style="color: #DD0000">"username"</span><span style="color: #007700">, </span><span style="color: #DD0000">"password"</span><span style="color: #007700">)<br /> or die(</span><span style="color: #DD0000">"can't connect: " </span><span style="color: #007700">. </span><span style="color: #0000BB">imap_last_error</span><span style="color: #007700">());<br /><br /></span><span style="color: #0000BB">$MC </span><span style="color: #007700">= </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">// Fetch an overview for all messages in INBOX<br /></span><span style="color: #0000BB">$result </span><span style="color: #007700">= </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">-></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 (</span><span style="color: #0000BB">$result </span><span style="color: #007700">as </span><span style="color: #0000BB">$overview</span><span style="color: #007700">) {<br /> echo </span><span style="color: #DD0000">"#</span><span style="color: #007700">{</span><span style="color: #0000BB">$overview</span><span style="color: #007700">-></span><span style="color: #0000BB">msgno</span><span style="color: #007700">}</span><span style="color: #DD0000"> (</span><span style="color: #007700">{</span><span style="color: #0000BB">$overview</span><span style="color: #007700">-></span><span style="color: #0000BB">date</span><span style="color: #007700">}</span><span style="color: #DD0000">) - From: </span><span style="color: #007700">{</span><span style="color: #0000BB">$overview</span><span style="color: #007700">-></span><span style="color: #0000BB">from</span><span style="color: #007700">}</span><span style="color: #DD0000"><br /> </span><span style="color: #007700">{</span><span style="color: #0000BB">$overview</span><span style="color: #007700">-></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">?></span>
|
|
</span>
|
|
</pre></div>
|
|
</div>
|
|
|
|
</div>
|
|
</p>
|
|
</div>
|
|
|
|
<div class="refsect1 seealso" id="refsect1-function.imap-fetch-overview-seealso">
|
|
<h3 class="title">参见</h3>
|
|
<p class="para">
|
|
<ul class="simplelist">
|
|
<li class="member"><span class="function"><a href="imap_fetchheader.html" class="function" rel="rdfs-seeAlso">imap_fetchheader()</a> - Returns header for a message</span></li>
|
|
</ul>
|
|
</p>
|
|
</div>
|
|
|
|
</div></div></div></body></html> |