2002-04-15 00:12:54 +00:00
|
|
|
<?xml version="1.0" encoding="iso-8859-1"?>
|
2007-06-20 22:25:43 +00:00
|
|
|
<!-- $Revision: 1.14 $ -->
|
|
|
|
<refentry xml:id="function.imap-append" xmlns="http://docbook.org/ns/docbook">
|
2007-01-14 15:37:21 +00:00
|
|
|
<refnamediv>
|
|
|
|
<refname>imap_append</refname>
|
|
|
|
<refpurpose>Append a string message to a specified mailbox</refpurpose>
|
|
|
|
</refnamediv>
|
2007-01-15 00:05:59 +00:00
|
|
|
<refsect1 role="description">
|
|
|
|
&reftitle.description;
|
2007-01-14 15:37:21 +00:00
|
|
|
<methodsynopsis>
|
|
|
|
<type>bool</type><methodname>imap_append</methodname>
|
|
|
|
<methodparam><type>resource</type><parameter>imap_stream</parameter></methodparam>
|
2007-01-15 00:05:59 +00:00
|
|
|
<methodparam><type>string</type><parameter>mailbox</parameter></methodparam>
|
2007-01-14 15:37:21 +00:00
|
|
|
<methodparam><type>string</type><parameter>message</parameter></methodparam>
|
|
|
|
<methodparam choice="opt"><type>string</type><parameter>options</parameter></methodparam>
|
|
|
|
</methodsynopsis>
|
|
|
|
<para>
|
2007-02-14 09:39:12 +00:00
|
|
|
Appends a string <parameter>message</parameter> to the specified <parameter>mailbox</parameter>.
|
2007-01-14 15:37:21 +00:00
|
|
|
</para>
|
2007-01-15 00:05:59 +00:00
|
|
|
</refsect1>
|
|
|
|
<refsect1 role="parameters">
|
|
|
|
&reftitle.parameters;
|
2007-01-14 15:37:21 +00:00
|
|
|
<para>
|
2007-01-15 00:05:59 +00:00
|
|
|
<variablelist>
|
|
|
|
&imap.imap-stream.description;
|
|
|
|
<varlistentry>
|
|
|
|
<term><parameter>mailbox</parameter></term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
The mailbox name, see <function>imap_open</function> for more
|
|
|
|
information
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
|
|
|
<term><parameter>message</parameter></term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
The message to be append, as a string
|
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
When talking to the Cyrus IMAP server, you must use "\r\n" as
|
|
|
|
your end-of-line terminator instead of "\n" or the operation will
|
|
|
|
fail
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
|
|
|
<term><parameter>options</parameter></term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
If provided, the <parameter>options</parameter> will also be written
|
|
|
|
to the <parameter>mailbox</parameter>
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
</variablelist>
|
2007-01-14 15:37:21 +00:00
|
|
|
</para>
|
2007-01-15 00:05:59 +00:00
|
|
|
</refsect1>
|
|
|
|
<refsect1 role="returnvalues">
|
|
|
|
&reftitle.returnvalues;
|
2007-01-14 15:37:21 +00:00
|
|
|
<para>
|
2007-01-15 00:05:59 +00:00
|
|
|
&return.success;
|
2007-01-14 15:37:21 +00:00
|
|
|
</para>
|
2007-01-15 00:05:59 +00:00
|
|
|
</refsect1>
|
|
|
|
<refsect1 role="examples">
|
|
|
|
&reftitle.examples;
|
2007-01-14 15:37:21 +00:00
|
|
|
<para>
|
|
|
|
<example>
|
|
|
|
<title><function>imap_append</function> example</title>
|
|
|
|
<programlisting role="php">
|
2002-04-15 00:12:54 +00:00
|
|
|
<![CDATA[
|
2003-07-16 17:25:02 +00:00
|
|
|
<?php
|
2006-01-23 01:48:07 +00:00
|
|
|
$stream = imap_open("{imap.example.org}INBOX.Drafts", "username", "password");
|
2002-04-15 00:12:54 +00:00
|
|
|
|
|
|
|
$check = imap_check($stream);
|
2004-03-08 09:18:45 +00:00
|
|
|
echo "Msg Count before append: ". $check->Nmsgs . "\n";
|
2002-04-15 00:12:54 +00:00
|
|
|
|
2006-01-23 01:48:07 +00:00
|
|
|
imap_append($stream, "{imap.example.org}INBOX.Drafts"
|
2003-12-15 16:55:22 +00:00
|
|
|
, "From: me@example.com\r\n"
|
|
|
|
. "To: you@example.com\r\n"
|
|
|
|
. "Subject: test\r\n"
|
|
|
|
. "\r\n"
|
|
|
|
. "this is a test message, please ignore\r\n"
|
2002-04-15 00:12:54 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
$check = imap_check($stream);
|
2004-03-08 09:18:45 +00:00
|
|
|
echo "Msg Count after append : ". $check->Nmsgs . "\n";
|
2002-04-15 00:12:54 +00:00
|
|
|
|
|
|
|
imap_close($stream);
|
2003-07-16 17:25:02 +00:00
|
|
|
?>
|
2002-04-15 00:12:54 +00:00
|
|
|
]]>
|
2007-01-14 15:37:21 +00:00
|
|
|
</programlisting>
|
|
|
|
</example>
|
|
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
</refentry>
|
2002-04-15 00:12:54 +00:00
|
|
|
|
|
|
|
<!-- 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
|
|
|
|
-->
|