[PHP-DOC] cvs: phpdoc /en/functions imap.xml From: Jani Taskinen (sniper <email protected>)
Date: 07/29/00

sniper Sat Jul 29 14:12:46 2000 EDT

  Modified files:
    /phpdoc/en/functions imap.xml
  Log:
  A start of documentation for imap_compose_mail(). At least an example there.
  
  
Index: phpdoc/en/functions/imap.xml
diff -u phpdoc/en/functions/imap.xml:1.20 phpdoc/en/functions/imap.xml:1.21
--- phpdoc/en/functions/imap.xml:1.20 Sat Jul 29 07:22:27 2000
+++ phpdoc/en/functions/imap.xml Sat Jul 29 14:12:46 2000
@@ -2636,6 +2636,45 @@
     </funcsynopsis>
     <para>
     </para>
+ <para>
+ <example>
+ <title><function>imap_mail_compose</function> example</title>
+ <programlisting role="php">
+<?php
+
+$envelope["from"]="musone <email protected>";
+$envelope["to"]="musone <email protected>";
+$envelope["cc"]="musone <email protected>";
+
+$part1["type"]=TYPEMULTIPART;
+$part1["subtype"]="mixed";
+
+$filename="/tmp/imap.c.gz";
+$fp=fopen($filename,"r");
+$contents=fread($fp,filesize($filename));
+fclose($fp);
+
+$part2["type"]=TYPEAPPLICATION;
+$part2["encoding"]=ENCBINARY;
+$part2["subtype"]="octet-stream";
+$part2["description"]=basename($filename);
+$part2["contents.data"]=$contents;
+
+$part3["type"]=TYPETEXT;
+$part3["subtype"]="plain";
+$part3["description"]="description3";
+$part3["contents.data"]="contents.data3\n\n\n\t";
+
+$body[1]=$part1;
+$body[2]=$part2;
+$body[3]=$part3;
+
+echo nl2br(imap_mail_compose($envelope,$body));
+
+?>
+ </programlisting>
+ </example>
+ </para>
    </refsect1>
   </refentry>