mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
added a first bunch of examples
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@21211 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
b7bbef7cc4
commit
5e6ad838ed
1 changed files with 30 additions and 2 deletions
|
@ -114,6 +114,32 @@
|
|||
your end-of-line terminator instead of "\n" or the operation will
|
||||
fail.
|
||||
</para>
|
||||
<para>
|
||||
<example>
|
||||
<title><function>imap_append</function> example</title>
|
||||
<programlisting>
|
||||
<?php
|
||||
$stream = imap_open("{your.imap.host}INBOX.Drafts","username", "password");
|
||||
|
||||
$check = imap_check($stream);
|
||||
print "Msg Count before append: ". $check->Nmsgs."\n";
|
||||
|
||||
imap_append($stream,"{your.imap.host}INBOX.Drafts"
|
||||
,"From: me@my.host\r\n"
|
||||
."To: you@your.host\r\n"
|
||||
."Subject: test\r\n"
|
||||
."\r\n"
|
||||
."this is a test message, please ignore\r\n"
|
||||
);
|
||||
|
||||
$check = imap_check($stream);
|
||||
print "Msg Count after append : ". $check->Nmsgs."\n";
|
||||
|
||||
imap_close($stream);
|
||||
?>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
|
@ -249,7 +275,8 @@
|
|||
<para>
|
||||
Close the imap stream. Takes an optional
|
||||
<parameter>flag</parameter> CL_EXPUNGE, which will silently
|
||||
expunge the mailbox before closing.
|
||||
expunge the mailbox before closing, removing all messages marked for
|
||||
deletion.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
@ -268,7 +295,8 @@
|
|||
</funcsynopsis>
|
||||
<para>
|
||||
<function>imap_createmailbox</function> creates a new mailbox
|
||||
specified by <parameter>mbox</parameter>.
|
||||
specified by <parameter>mbox</parameter>. Names containing
|
||||
international characters should be encoded by <function>imap_utf7_encode</function>
|
||||
</para>
|
||||
<para>
|
||||
Returns true on success and false on error.
|
||||
|
|
Loading…
Reference in a new issue