2002-04-15 00:12:54 +00:00
|
|
|
<?xml version="1.0" encoding="iso-8859-1"?>
|
2006-01-23 01:48:07 +00:00
|
|
|
<!-- $Revision: 1.10 $ -->
|
2002-04-15 00:12:54 +00:00
|
|
|
<!-- splitted from ./en/functions/imap.xml, last change in rev 1.2 -->
|
|
|
|
<refentry id="function.imap-append">
|
|
|
|
<refnamediv>
|
|
|
|
<refname>imap_append</refname>
|
|
|
|
<refpurpose>
|
|
|
|
Append a string message to a specified mailbox
|
|
|
|
</refpurpose>
|
|
|
|
</refnamediv>
|
|
|
|
<refsect1>
|
|
|
|
<title>Description</title>
|
|
|
|
<methodsynopsis>
|
2002-10-09 14:55:05 +00:00
|
|
|
<type>bool</type><methodname>imap_append</methodname>
|
|
|
|
<methodparam><type>resource</type><parameter>imap_stream</parameter></methodparam>
|
2002-04-15 00:12:54 +00:00
|
|
|
<methodparam><type>string</type><parameter>mbox</parameter></methodparam>
|
|
|
|
<methodparam><type>string</type><parameter>message</parameter></methodparam>
|
2002-10-09 14:55:05 +00:00
|
|
|
<methodparam choice="opt"><type>string</type><parameter>options</parameter></methodparam>
|
2002-04-15 00:12:54 +00:00
|
|
|
</methodsynopsis>
|
|
|
|
<para>
|
|
|
|
<function>imap_append</function> appends a string message to the
|
|
|
|
specified mailbox <parameter>mbox</parameter>. If the optional
|
2002-10-09 14:55:05 +00:00
|
|
|
<parameter>options</parameter> is specified, writes the
|
|
|
|
<parameter>options</parameter> to that mailbox also.
|
2002-04-15 00:12:54 +00:00
|
|
|
</para>
|
2003-02-06 03:12:39 +00:00
|
|
|
<para>
|
2003-02-06 10:04:54 +00:00
|
|
|
&return.success;
|
2003-02-06 03:12:39 +00:00
|
|
|
</para>
|
2002-04-15 00:12:54 +00:00
|
|
|
<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>
|
|
|
|
<para>
|
|
|
|
<example>
|
|
|
|
<title><function>imap_append</function> example</title>
|
|
|
|
<programlisting role="php">
|
|
|
|
<![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
|
|
|
]]>
|
|
|
|
</programlisting>
|
|
|
|
</example>
|
|
|
|
</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:"../../../../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
|
|
|
|
-->
|