Files
php-doc-ru/reference/imap/functions/imap-delete.xml
Alexey Pyltsyn 500b85ee44 IMAP: review
git-svn-id: https://svn.php.net/repository/phpdoc/ru/trunk@344677 c90b9560-bf6c-de11-be94-00142212c4b1
2018-04-16 09:08:34 +00:00

134 lines
4.3 KiB
XML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: a3154220084c0163222de9506af0e8c80838d5ff Maintainer: rjhdby Status: ready -->
<!-- Reviewed: yes Maintainer: lex -->
<refentry xml:id="function.imap-delete" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>imap_delete</refname>
<refpurpose>Пометить сообщение для удаления</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>bool</type><methodname>imap_delete</methodname>
<methodparam><type>resource</type><parameter>imap_stream</parameter></methodparam>
<methodparam><type>int</type><parameter>msg_number</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>options</parameter><initializer>0</initializer></methodparam>
</methodsynopsis>
<para>
Помечает сообщения, перечисленные в <parameter>msg_number</parameter> для
удаления. Помеченные сообщения будут оставаться в ящике пока не будет вызвана
функция <function>imap_expunge</function>, либо
<function>imap_close</function> с установленным параметром
<constant>CL_EXPUNGE</constant>.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
&imap.imap-stream.description;
<varlistentry>
<term><parameter>msg_number</parameter></term>
<listitem>
<para>
Номер сообщения
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>options</parameter></term>
<listitem>
<para>
Можно задать как <constant>FT_UID</constant>, тогда функция будет
ожидать в параметре <parameter>msg_number</parameter> не номер сообщения,
а <literal>UID</literal>.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Возвращает &true;.
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>Пример использования <function>imap_delete</function></title>
<programlisting role="php">
<![CDATA[
<?php
$mbox = imap_open("{imap.example.org}INBOX", "username", "password")
or die("Не удалось подключиться: " . imap_last_error());
$check = imap_mailboxmsginfo($mbox);
echo "Сообщения до отметки для удаления: " . $check->Nmsgs . "<br />\n";
imap_delete($mbox, 1);
$check = imap_mailboxmsginfo($mbox);
echo "Сообщения после отметки для удаления: " . $check->Nmsgs . "<br />\n";
imap_expunge($mbox);
$check = imap_mailboxmsginfo($mbox);
echo "Сообщения после удаления: " . $check->Nmsgs . "<br />\n";
imap_close($mbox);
?>
]]>
</programlisting>
</example>
</para>
</refsect1>
<refsect1 role="notes">
&reftitle.notes;
<note>
<para>
Ящики IMAP могут не сохранять флаги между соединениями, следовательно если
вы действительно хотите удалить помеченные сообщения, то необходимо
вызывать <function>imap_expunge</function> в том же соединении, в котором
флаги устанавливались.
</para>
</note>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function>imap_undelete</function></member>
<member><function>imap_expunge</function></member>
<member><function>imap_close</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
-->