svn: /pear/peardoc/trunk/en/package/mail/mail-mime/ example.xml get.xml mail-mime.xml
[email protected] (Aleksander Machniak) Fri, 08 Apr 2011 12:09:59 +0000
| Newsgroups | php.pear.doc |
|---|---|
| Message-ID | <[email protected]> |
alec Fri, 08 Apr 2011 12:09:59 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=310064
Log:
Updated Mail_Mime documentation
Changed paths:
U pear/peardoc/trunk/en/package/mail/mail-mime/example.xml
U pear/peardoc/trunk/en/package/mail/mail-mime/get.xml
U pear/peardoc/trunk/en/package/mail/mail-mime/mail-mime.xml
Modified: pear/peardoc/trunk/en/package/mail/mail-mime/example.xml
===================================================================
--- pear/peardoc/trunk/en/package/mail/mail-mime/example.xml 2011-04-08 12:04:03 UTC (rev 310063)
+++ pear/peardoc/trunk/en/package/mail/mail-mime/example.xml 2011-04-08 12:09:59 UTC (rev 310064)
@@ -9,6 +9,7 @@
<programlisting role="php">
<![CDATA[
<?php
+
include('Mail.php');
include('Mail/mime.php');
@@ -27,12 +28,17 @@
$mime->setHTMLBody($html);
$mime->addAttachment($file, 'text/plain');
-//do not ever try to call these lines in reverse order
+// do not ever try to call these lines in reverse order
+// when using versions older than 1.6.0
$body = $mime->get();
-$hdrs = $mime->headers($hdrs);
+// or in 1.6.0 and newer
+// $body = $mime->getMessageBody();
+$hdrs = $mime->txtHeaders($hdrs);
+
$mail =& Mail::factory('mail');
$mail->send('postmaster@localhost', $hdrs, $body);
+
?>
]]>
</programlisting>
Modified: pear/peardoc/trunk/en/package/mail/mail-mime/get.xml
===================================================================
--- pear/peardoc/trunk/en/package/mail/mail-mime/get.xml 2011-04-08 12:04:03 UTC (rev 310063)
+++ pear/peardoc/trunk/en/package/mail/mail-mime/get.xml 2011-04-08 12:09:59 UTC (rev 310064)
@@ -34,40 +34,8 @@
<itemizedlist>
<listitem>
<para>
- <parameter>array $param</parameter> - An associative array of parameters.
- These parameters affect the way the message is built.
- <itemizedlist>
- <listitem>
- <para>
- <parameter>$param["text_encoding"]</parameter> - Type of encoding to
- use for the plain text part of the email. Default is <quote>7bit</quote>.
- </para>
- </listitem>
- <listitem>
- <para>
- <parameter>$param["html_encoding"]</parameter> - Type of encoding for
- the HTML part of the email. Default is <quote>quoted-printable</quote>.
- </para>
- </listitem>
- <listitem>
- <para>
- <parameter>$param["head_charset"]</parameter> - The character set
- to use for the headers. Default is <quote>iso-8859-1</quote>.
- </para>
- </listitem>
- <listitem>
- <para>
- <parameter>$param["text_charset"]</parameter> - The character set
- to use for the plain text part of the email. Default is <quote>iso-8859-1</quote>.
- </para>
- </listitem>
- <listitem>
- <para>
- <parameter>$param["html_charset"]</parameter> - The character set
- to use for the HTML part of the email. Default is <quote>iso-8859-1</quote>.
- </para>
- </listitem>
- </itemizedlist>
+ <parameter>array $param</parameter> - An associative array of build parameters.
+ See <link linkend="package.mail.mail-mime.mail-mime">constructor</link> parameters list.
</para>
</listitem>
</itemizedlist>
@@ -86,7 +54,7 @@
¬e.notstatic;
<warning>
<para>
- <function>Mail_Mime::get</function> has to be called
+ For versions older than 1.6.0 <function>Mail_Mime::get</function> has to be called
<emphasis>before</emphasis>
<link linkend="package.mail.mail-mime.headers"><function>Mail_Mime::headers</function></link>.
</para>
Modified: pear/peardoc/trunk/en/package/mail/mail-mime/mail-mime.xml
===================================================================
--- pear/peardoc/trunk/en/package/mail/mail-mime/mail-mime.xml 2011-04-08 12:04:03 UTC (rev 310063)
+++ pear/peardoc/trunk/en/package/mail/mail-mime/mail-mime.xml 2011-04-08 12:09:59 UTC (rev 310064)
@@ -11,10 +11,8 @@
</funcsynopsisinfo>
<funcprototype>
<funcdef>Mail_mime <function>Mail_mime</function></funcdef>
- <paramdef choice="opt">string
- <parameter>
- $crlf = "\r\n"
- </parameter>
+ <paramdef choice="opt">
+ mixed <parameter>$params</parameter> = array()
</paramdef>
</funcprototype>
</funcsynopsis>
@@ -27,26 +25,82 @@
</refsection>
<refsection xml:id="package.mail.mail-mime.mail-mime.parameter">
&title.param;
- <para>
- <itemizedlist>
- <listitem>
<para>
- <parameter>string $crlf</parameter> - the type of
- line end to use.
+ array <parameter>$params</parameter> - An associative array of parameters.
+ These parameters affect the way the message is built. Use
+ <link linkend="package.mail.mail-mime.setparam"><function>Mail_Mime::setParam</function></link>
+ to set them later.
+ <itemizedlist>
+ <listitem>
+ <para>
+ <parameter>$params['eol']</parameter> - Type of line end.
+ Default is <quote>"\r\n"</quote>.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>$params['delay_file_io']</parameter> - Specifies if attachment files
+ should be read immediately when adding them into message object or when building
+ the message. Useful for big messages handling using saveMessage* functions.
+ Default is <quote>false</quote>.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>$params['head_encoding']</parameter> - Type of encoding to
+ use for the headers of the email. Default is <quote>quoted-printable</quote>.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>$params['text_encoding']</parameter> - Type of encoding to
+ use for the plain text part of the email. Default is <quote>quoted-printable</quote>.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>$params['html_encoding']</parameter> - Type of encoding for
+ the HTML part of the email. Default is <quote>quoted-printable</quote>.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>$params['head_charset']</parameter> - The character set
+ to use for the headers. Default is <quote>iso-8859-1</quote>.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>$params['text_charset']</parameter> - The character set
+ to use for the plain text part of the email. Default is <quote>iso-8859-1</quote>.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>$params['html_charset']</parameter> - The character set
+ to use for the HTML part of the email. Default is <quote>iso-8859-1</quote>.
+ </para>
+ </listitem>
+ </itemizedlist>
</para>
- </listitem>
- </itemizedlist>
- </para>
- </refsection>
+ </refsection>
<refsection xml:id="package.mail.mail-mime.mail-mime.note">
&title.note;
<para>
- Normally, it is not necessary to set the
- <parameter>$crlf</parameter> parameter. But, if you want to send
+ Normally, it is not necessary to set parameters. But, if you want to send
the generated MIME message using
<link linkend="package.mail.mail"><classname>Mail</classname></link>
- then you have to set <parameter>$crlf</parameter> to
- <parameter>"\n"</parameter>
+ then you have to set <parameter>eol</parameter> to
+ <parameter>"\n"</parameter>.
</para>
+ <para>
+ For backward compatybility setting end of line string as constructor's
+ first parameter is supported.
+ </para>
+ <para>
+ If you're working with big attachments, enabling 'delay_file_io' will
+ provent from loading attachments into memory. Until you're not using
+ getMessage* functions don't worry about PHP's memory limit.
+ </para>
</refsection>
- </refentry>
+</refentry>