cvs: peardoc /en/core mail.xml
| From: | Martin Jansen | Date: | Sun, 06 Jan 2002 11:27:06 +0000 |
| Subject: | cvs: peardoc /en/core mail.xml | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-1852@lists.php.net to get a copy of this message | ||
mj Sun Jan 6 06:27:06 2002 EDT
Modified files:
/peardoc/en/core mail.xml
Log:
* Wrap lines.
Index: peardoc/en/core/mail.xml diff -u peardoc/en/core/mail.xml:1.1 peardoc/en/core/mail.xml:1.2 --- peardoc/en/core/mail.xml:1.1 Sun Jan 6 06:14:56 2002 +++ peardoc/en/core/mail.xml Sun Jan 6 06:27:06 2002 @@ -1,5 +1,5 @@ <?xml encoding="iso-8859-1"?> -<!-- $Revision: 1.1 $ --> +<!-- $Revision: 1.2 $ --> <reference id="core.mail"> <title>PEAR Mail: Mail handling functions</title> @@ -11,7 +11,7 @@ </simpara> </partintro> - + <refentry id="core.mail.Mail"> <refnamediv> <refname>Mail</refname> @@ -20,31 +20,31 @@ <refsect1> <title>Description</title> <simpara> - Provides an interface to the Mail:: classes. - Also provides supporting functions useful in multiple + Provides an interface to the Mail:: classes. + Also provides supporting functions useful in multiple mailer backends. </simpara> </refsect1> <refsect1> - <title><function>Mail::factory</function></title> - <simpara> - This method is used to create a mail object from one of the - driver classes in the Mail/ directory. It takes two arguments, - the first being the driver type to use, and the second being an - array of parameters to pass to the driver objects' constructor. + <title><function>Mail::factory</function></title> + <simpara> + This method is used to create a mail object from one of the + driver classes in the Mail/ directory. It takes two arguments, + the first being the driver type to use, and the second being an + array of parameters to pass to the driver objects' constructor. </simpara> <programlisting role="php"> $params['host'] = 'localhost'; $params['port'] = 25; -$mail_object =& Mail::factory('smtp', $params); - </programlisting> +$mail_object =& Mail::factory('smtp', $params); + </programlisting> <para> - You can then call the <function>send</function> method of the - $mail_object with the correct arguments (see the + You can then call the <function>send</function> method of the + $mail_object with the correct arguments (see the Mail_mail, Mail_smtp, Mail_sendmail docs). </para> </refsect1> @@ -64,23 +64,23 @@ </refsect1> <refsect1> - <title><function>send</function></title> + <title><function>send</function></title> <simpara> This method sends mail using the php built in <function> - mail</function> function. As with the other driver functions it + mail</function> function. As with the other driver functions it takes three arguments: </simpara> <para> <itemizedlist> <listitem> <para> - <parameter>$recipients</parameter> - An array or comma seperated - string of recipients. + <parameter>$recipients</parameter> - An array or comma + seperated string of recipients. </para> </listitem> <listitem> <para> - <parameter>$headers</parameter> - An associative array of + <parameter>$headers</parameter> - An associative array of headers. Header name being the key, header value being the value. </para> @@ -108,7 +108,7 @@ $mail_object =& Mail::factory('mail'); $mail_object->send($recipients, $headers, $body); - </programlisting> + </programlisting> </refsect1> </refentry> @@ -121,16 +121,16 @@ <title>Description</title> <simpara> A driver object providing the <function>send</function> method - using a sendmail executable. + using a sendmail executable. </simpara> </refsect1> <refsect1> <title>constructor</title> <simpara> - When creating the object using the $obj =& Mail::factory() - syntax, the parameters passed to method are subsequently passed - to this objects constructor. The possible parameters are: + When creating the object using the $obj =& Mail::factory() + syntax, the parameters passed to method are subsequently passed + to this objects constructor. The possible parameters are: </simpara> <para> <itemizedlist> @@ -147,27 +147,27 @@ arguments to pass to the sendmail executable. Defaults to blank if not given. </para> - </listitem> + </listitem> </itemizedlist> </para> </refsect1> <refsect1> - <title><function>send</function></title> + <title><function>send</function></title> <simpara> - This method sends mail using a sendmail executable. As with the + This method sends mail using a sendmail executable. As with the other driver functions it takes three arguments: </simpara> <para> <itemizedlist> <listitem> <para> - <parameter>$recipients</parameter> - An array or comma seperated - string of recipients. + <parameter>$recipients</parameter> - An array or comma + seperated string of recipients. </para> </listitem> <listitem> <para> - <parameter>$headers</parameter> - An associative array of + <parameter>$headers</parameter> - An associative array of headers. Header name being the key, header value being the value. </para> @@ -195,8 +195,8 @@ // Create the mail object using the Mail::factory method $mail_object =& Mail::factory('sendmail', $params); -$mail_object->send($recipients, $headers, $body); - </programlisting> +$mail_object->send($recipients, $headers, $body); + </programlisting> </refsect1> </refentry> @@ -210,73 +210,76 @@ <title>Description</title> <simpara> A driver object providing the <function>send</function> method - using smtp. Utilises the <filename>Net/smtp.php</filename> and + using smtp. Utilises the <filename>Net/smtp.php</filename> and <filename>Net/socket.php</filename> classes to connect to the - server. + server. </simpara> </refsect1> <refsect1> - <title>constructor</title> + <title>constructor</title> <simpara> - When creating the object using the $obj =& Mail::factory() - syntax, the parameters passed to method are subsequently passed - to this objects constructor. The possible parameters are: + When creating the object using the $obj =& Mail::factory() + syntax, the parameters passed to method are subsequently passed + to this objects constructor. The possible parameters are: </simpara> <para> <itemizedlist> <listitem> <para> - <parameter>$host</parameter> - The smtp server to connect to. Either an IP address or - hostname. Default if not given is localhost. + <parameter>$host</parameter> - The smtp server to connect to. + Either an IP address or hostname. Default if not given is + localhost. </para> </listitem> <listitem> <para> - <parameter>$port</parameter> - The port on which the smtp server runs. Default if not - given is 25. + <parameter>$port</parameter> - The port on which the smtp + server runs. Default if not given is 25. </para> </listitem> <listitem> <para> - <parameter>$auth</parameter> - Whether to use authentication or not. Default if not - given is false. + <parameter>$auth</parameter> - Whether to use authentication + or not. Default if not given is false. </para> </listitem> <listitem> <para> - <parameter>$username</parameter> - Username to use in conjunction with authentication. - Default if not given is blank. + <parameter>$username</parameter> - Username to use in + conjunction with authentication. Default if not given is + blank. </para> </listitem> <listitem> <para> - <parameter>$password</parameter> - Password to use in conjunction with authentication. - Default if not given is blank. + <parameter>$password</parameter> - Password to use in + conjunction with authentication. Default if not given is + blank. </para> </listitem> </itemizedlist> </para> </refsect1> <refsect1> - <title><function>send</function></title> + <title><function>send</function></title> <simpara> This method sends mail using smtp. It uses the <filename> Net/Socket.php</filename> and <filename>Net/SMTP.php</filename> - classes so ensure these are available. As with the other driver + classes so ensure these are available. As with the other driver functions it takes three arguments: </simpara> <para> <itemizedlist> <listitem> <para> - <parameter>$recipients</parameter> - An array or comma seperated - string of recipients. + <parameter>$recipients</parameter> - An array or comma + seperated string of recipients. </para> </listitem> <listitem> <para> - <parameter>$headers</parameter> - An associative array of + <parameter>$headers</parameter> - An associative array of headers. Header name being the key, header value being the value. </para> @@ -305,7 +308,7 @@ $mail_object =& Mail::factory('smtp', $params); $mail_object->send($recipients, $headers, $body); - </programlisting> + </programlisting> </refsect1> </refentry> @@ -318,70 +321,72 @@ <refsect1> <title>Description</title> <simpara> - A class to enable easy creation of complex multipart emails. - If what you're after is a simple API for creating such emails, - then this class will probably suffice. If on the other hand - you're after a higher degree of control over the email, then - you might want to look at using <filename>mimePart.php</filename>. + A class to enable easy creation of complex multipart emails. + If what you're after is a simple API for creating such emails, + then this class will probably suffice. If on the other hand + you're after a higher degree of control over the email, then + you might want to look at using <filename>mimePart.php</filename>. </simpara> </refsect1> <refsect1> <title>constructor</title> <simpara> - The constructor takes only one argument, and that is the type of - line end to use. The standard for this is CRLF, however *nix - commonly uses LF and Macs CR. + The constructor takes only one argument, and that is the type of + line end to use. The standard for this is CRLF, however *nix + commonly uses LF and Macs CR. </simpara> </refsect1> <refsect1> - <title><function>setTXTBody</function></title> + <title><function>setTXTBody</function></title> <simpara> This function sets the plain text part of the email. It takes - two arguments: + two arguments: </simpara> <para> <itemizedlist> <listitem> <para> - <parameter>$data</parameter> - Either the text to set, or a filename of a text file - to use. + <parameter>$data</parameter> - Either the text to set, or a + filename of a text file to use. </para> </listitem> <listitem> <para> - <parameter>$isfile</parameter> - Optional. If true, then $data is assumed to be a - filename and read in- + <parameter>$isfile</parameter> - Optional. If true, then + <parameter>$data</parameter> is assumed to be a filename and + read in. </para> </listitem> </itemizedlist> </para> </refsect1> <refsect1> - <title><function>setHTMLBody</function></title> + <title><function>setHTMLBody</function></title> <simpara> This function sets the HTML part of the email. It takes - two arguments: + two arguments: </simpara> <para> <itemizedlist> <listitem> <para> - <parameter>$data</parameter> - Either the HTML to set, or a filename of a text file - to use. + <parameter>$data</parameter> - Either the HTML to set, or a + filename of a text file to use. </para> </listitem> <listitem> <para> - <parameter>$isfile</parameter> - Optional. If true, then $data is assumed to be a - filename and read in- + <parameter>$isfile</parameter> - Optional. If true, then + <parameter>$data</parameter> is assumed to be a filename and + read in. </para> </listitem> </itemizedlist> </para> </refsect1> <refsect1> - <title><function>setHTMLImage</function></title> + <title><function>setHTMLImage</function></title> <simpara> If sending an HTML email with embedded images, use this function to add the image. It takes four arguments: @@ -390,26 +395,27 @@ <itemizedlist> <listitem> <para> - <parameter>$file</parameter> - Either a filename or the actual file data itself. + <parameter>$file</parameter> - Either a filename or the actual + file data itself. </para> </listitem> <listitem> <para> - <parameter>$c_type</parameter> - The content type of the image/file. Defaults to - application/octet-stream if not given. + <parameter>$c_type</parameter> - The content type of the + image/file. Defaults to application/octet-stream if not given. </para> </listitem> <listitem> <para> - <parameter>$name</parameter> - The filename of the image/file. Defaults to blank if - not given. + <parameter>$name</parameter> - The filename of the image/file. + Defaults to blank if not given. </para> </listitem> <listitem> <para> - <parameter>$isfilename</parameter> - Whether the $file argument is a filename or not. - If true, the file will be read in Defaults to true if not - given. + <parameter>$isfilename</parameter> - Whether the <parameter> + $file</parameter> argument is a filename or not. If true, the + file will be read in. Defaults to true if not given. </para> </listitem> </itemizedlist> @@ -429,33 +435,35 @@ <itemizedlist> <listitem> <para> - <parameter>$file</parameter> - Either a filename or the actual file data itself. + <parameter>$file</parameter> - Either a filename or the actual + file data itself. </para> </listitem> <listitem> <para> - <parameter>$c_type</parameter> - Content type of the file. Defaults to - application/octet-stream if not given. + <parameter>$c_type</parameter> - Content type of the file. + Defaults to application/octet-stream if not given. </para> </listitem> <listitem> <para> - <parameter>$name</parameter> - The filename of the file. Defaults to blank if not - given. + <parameter>$name</parameter> - The filename of the file. + Defaults to blank if not given. </para> </listitem> <listitem> <para> - <parameter>$isfilename</parameter> - Whether the $file argument is a filename or not. - If true, the file will be read in Defaults to true if not - given. + <parameter>$isfilename</parameter> - Whether the <parameter> + $file</parameter> argument is a filename or not. If true, the + file will be read in Defaults to true if not given. </para> </listitem> <listitem> <para> - <parameter>$encoding</parameter> - Type of transfer encoding to use for the file data. - Defaults to base64 if not given For text based files - (eg. scripts/html etc) this could be given as quoted-printable. + <parameter>$encoding</parameter> - Type of transfer encoding + to use for the file data. Defaults to base64 if not given. for + text based files (eg. scripts/html etc) this could be given as + quoted-printable. </para> </listitem> </itemizedlist> @@ -473,40 +481,41 @@ <link linkend="core.mail.smtp">Mail_smtp</link> classes described elsewhere in this documentation. It takes one argument only, which is an associative array of parameters. These - parameters affect the way the email is built and can consist of: + parameters affect the way the email is built and can consist of: </simpara> <para> <itemizedlist> <listitem> <para> - <parameter>$text_encoding</parameter> - Type of encoding to use for the plain text - part of the email. Default is 7bit. + <parameter>$text_encoding</parameter> - Type of encoding to + use for the plain text part of the email. Default is 7bit. </para> </listitem> <listitem> <para> - <parameter>$html_encoding</parameter> - Type of encoding for the HTML part of the - email. Default is quoted-printable. + <parameter>$html_encoding</parameter> - Type of encoding for + the HTML part of the email. Default is quoted-printable. </para> </listitem> <listitem> <para> - <parameter>$7bit_wrap</parameter> - Number of characters after which text is wrapped. - SMTP stipulates maximum line length of 1000 characters - including CRLF. Default is 998 (CRLF is appended to make up to - 1000). + <parameter>$7bit_wrap</parameter> - Number of characters + after which text is wrapped. SMTP stipulates maximum line + length of 1000 characters including CRLF. Default is 998 + (CRLF is appended to make up to 1000). </para> </listitem> <listitem> <para> - <parameter>$text_charset</parameter> - The character set to use for the plain text - part of the email. Default is iso-8859-1. + <parameter>$text_charset</parameter> - The character set to + use for the plain text part of the email. Default is + iso-8859-1. </para> </listitem> <listitem> <para> - <parameter>$html_charset</parameter> - The character set to use for the HTML part of - the email. Default is iso-8859-1. + <parameter>$html_charset</parameter> - The character set to + use for the HTML part of the email. Default is iso-8859-1. </para> </listitem> </itemizedlist> @@ -553,7 +562,7 @@ $hdrs =& $mime->headers($hdrs); $mail =& Mail::factory('mail'); -$mail->send('joe@example.com', $hdrs, $body); +$mail->send('joe@example.com', $hdrs, $body); ]]> </programlisting> </refsect1> @@ -583,9 +592,9 @@ true, then the headers will be decoded (RFC2047). </para> <para> - <emphasis>ctype_primary:</emphasis> The first part of the - content type (ie. before the forward slash). Eg. If the content - type is multipart/mixed, ctype_primary would be "multipart" + <emphasis>ctype_primary:</emphasis> The first part of the + content type (ie. before the forward slash). Eg. If the content + type is multipart/mixed, ctype_primary would be "multipart" (no quotes). </para> <para> @@ -656,7 +665,7 @@ <simpara> This function performs the decoding and returns the structure as detailed above. It takes just one argument which is an - associative array of parameters. These parameters can consist of: + associative array of parameters. These parameters can consist of: </simpara> <itemizedlist> <listitem> @@ -701,7 +710,7 @@ return them in an associative array containing the file data, file perms and file name. It takes only one argument, that being the input to look at. This function can be called statically, - even if you do not use the rest of the classes functionality. + even if you do not use the rest of the classes functionality. </simpara> </refsect1> <refsect1> @@ -713,7 +722,7 @@ http://www.phpguru.org/xmail/ or with the PEAR mime package (when it is available). The method takes only one argument, and that is the returned data from the <function>decode - </function> method. + </function> method. </simpara> </refsect1> <refsect1> @@ -730,9 +739,9 @@ $params['decode_headers'] = TRUE; $decoder = new Mail_mimeDecode($input); -$structure = $decoder->decode($params); +$structure = $decoder->decode($params); </programlisting> - + <para> This example calls the decode function statically (ie no object, straight function call) and then passes the structure to the
Index: peardoc/en/core/mail.xml diff -u peardoc/en/core/mail.xml:1.1 peardoc/en/core/mail.xml:1.2 --- peardoc/en/core/mail.xml:1.1 Sun Jan 6 06:14:56 2002 +++ peardoc/en/core/mail.xml Sun Jan 6 06:27:06 2002 @@ -1,5 +1,5 @@ <?xml encoding="iso-8859-1"?> -<!-- $Revision: 1.1 $ --> +<!-- $Revision: 1.2 $ --> <reference id="core.mail"> <title>PEAR Mail: Mail handling functions</title> @@ -11,7 +11,7 @@ </simpara> </partintro> - + <refentry id="core.mail.Mail"> <refnamediv> <refname>Mail</refname> @@ -20,31 +20,31 @@ <refsect1> <title>Description</title> <simpara> - Provides an interface to the Mail:: classes. - Also provides supporting functions useful in multiple + Provides an interface to the Mail:: classes. + Also provides supporting functions useful in multiple mailer backends. </simpara> </refsect1> <refsect1> - <title><function>Mail::factory</function></title> - <simpara> - This method is used to create a mail object from one of the - driver classes in the Mail/ directory. It takes two arguments, - the first being the driver type to use, and the second being an - array of parameters to pass to the driver objects' constructor. + <title><function>Mail::factory</function></title> + <simpara> + This method is used to create a mail object from one of the + driver classes in the Mail/ directory. It takes two arguments, + the first being the driver type to use, and the second being an + array of parameters to pass to the driver objects' constructor. </simpara> <programlisting role="php"> $params['host'] = 'localhost'; $params['port'] = 25; -$mail_object =& Mail::factory('smtp', $params); - </programlisting> +$mail_object =& Mail::factory('smtp', $params); + </programlisting> <para> - You can then call the <function>send</function> method of the - $mail_object with the correct arguments (see the + You can then call the <function>send</function> method of the + $mail_object with the correct arguments (see the Mail_mail, Mail_smtp, Mail_sendmail docs). </para> </refsect1> @@ -64,23 +64,23 @@ </refsect1> <refsect1> - <title><function>send</function></title> + <title><function>send</function></title> <simpara> This method sends mail using the php built in <function> - mail</function> function. As with the other driver functions it + mail</function> function. As with the other driver functions it takes three arguments: </simpara> <para> <itemizedlist> <listitem> <para> - <parameter>$recipients</parameter> - An array or comma seperated - string of recipients. + <parameter>$recipients</parameter> - An array or comma + seperated string of recipients. </para> </listitem> <listitem> <para> - <parameter>$headers</parameter> - An associative array of + <parameter>$headers</parameter> - An associative array of headers. Header name being the key, header value being the value. </para> @@ -108,7 +108,7 @@ $mail_object =& Mail::factory('mail'); $mail_object->send($recipients, $headers, $body); - </programlisting> + </programlisting> </refsect1> </refentry> @@ -121,16 +121,16 @@ <title>Description</title> <simpara> A driver object providing the <function>send</function> method - using a sendmail executable. + using a sendmail executable. </simpara> </refsect1> <refsect1> <title>constructor</title> <simpara> - When creating the object using the $obj =& Mail::factory() - syntax, the parameters passed to method are subsequently passed - to this objects constructor. The possible parameters are: + When creating the object using the $obj =& Mail::factory() + syntax, the parameters passed to method are subsequently passed + to this objects constructor. The possible parameters are: </simpara> <para> <itemizedlist> @@ -147,27 +147,27 @@ arguments to pass to the sendmail executable. Defaults to blank if not given. </para> - </listitem> + </listitem> </itemizedlist> </para> </refsect1> <refsect1> - <title><function>send</function></title> + <title><function>send</function></title> <simpara> - This method sends mail using a sendmail executable. As with the + This method sends mail using a sendmail executable. As with the other driver functions it takes three arguments: </simpara> <para> <itemizedlist> <listitem> <para> - <parameter>$recipients</parameter> - An array or comma seperated - string of recipients. + <parameter>$recipients</parameter> - An array or comma + seperated string of recipients. </para> </listitem> <listitem> <para> - <parameter>$headers</parameter> - An associative array of + <parameter>$headers</parameter> - An associative array of headers. Header name being the key, header value being the value. </para> @@ -195,8 +195,8 @@ // Create the mail object using the Mail::factory method $mail_object =& Mail::factory('sendmail', $params); -$mail_object->send($recipients, $headers, $body); - </programlisting> +$mail_object->send($recipients, $headers, $body); + </programlisting> </refsect1> </refentry> @@ -210,73 +210,76 @@ <title>Description</title> <simpara> A driver object providing the <function>send</function> method - using smtp. Utilises the <filename>Net/smtp.php</filename> and + using smtp. Utilises the <filename>Net/smtp.php</filename> and <filename>Net/socket.php</filename> classes to connect to the - server. + server. </simpara> </refsect1> <refsect1> - <title>constructor</title> + <title>constructor</title> <simpara> - When creating the object using the $obj =& Mail::factory() - syntax, the parameters passed to method are subsequently passed - to this objects constructor. The possible parameters are: + When creating the object using the $obj =& Mail::factory() + syntax, the parameters passed to method are subsequently passed + to this objects constructor. The possible parameters are: </simpara> <para> <itemizedlist> <listitem> <para> - <parameter>$host</parameter> - The smtp server to connect to. Either an IP address or - hostname. Default if not given is localhost. + <parameter>$host</parameter> - The smtp server to connect to. + Either an IP address or hostname. Default if not given is + localhost. </para> </listitem> <listitem> <para> - <parameter>$port</parameter> - The port on which the smtp server runs. Default if not - given is 25. + <parameter>$port</parameter> - The port on which the smtp + server runs. Default if not given is 25. </para> </listitem> <listitem> <para> - <parameter>$auth</parameter> - Whether to use authentication or not. Default if not - given is false. + <parameter>$auth</parameter> - Whether to use authentication + or not. Default if not given is false. </para> </listitem> <listitem> <para> - <parameter>$username</parameter> - Username to use in conjunction with authentication. - Default if not given is blank. + <parameter>$username</parameter> - Username to use in + conjunction with authentication. Default if not given is + blank. </para> </listitem> <listitem> <para> - <parameter>$password</parameter> - Password to use in conjunction with authentication. - Default if not given is blank. + <parameter>$password</parameter> - Password to use in + conjunction with authentication. Default if not given is + blank. </para> </listitem> </itemizedlist> </para> </refsect1> <refsect1> - <title><function>send</function></title> + <title><function>send</function></title> <simpara> This method sends mail using smtp. It uses the <filename> Net/Socket.php</filename> and <filename>Net/SMTP.php</filename> - classes so ensure these are available. As with the other driver + classes so ensure these are available. As with the other driver functions it takes three arguments: </simpara> <para> <itemizedlist> <listitem> <para> - <parameter>$recipients</parameter> - An array or comma seperated - string of recipients. + <parameter>$recipients</parameter> - An array or comma + seperated string of recipients. </para> </listitem> <listitem> <para> - <parameter>$headers</parameter> - An associative array of + <parameter>$headers</parameter> - An associative array of headers. Header name being the key, header value being the value. </para> @@ -305,7 +308,7 @@ $mail_object =& Mail::factory('smtp', $params); $mail_object->send($recipients, $headers, $body); - </programlisting> + </programlisting> </refsect1> </refentry> @@ -318,70 +321,72 @@ <refsect1> <title>Description</title> <simpara> - A class to enable easy creation of complex multipart emails. - If what you're after is a simple API for creating such emails, - then this class will probably suffice. If on the other hand - you're after a higher degree of control over the email, then - you might want to look at using <filename>mimePart.php</filename>. + A class to enable easy creation of complex multipart emails. + If what you're after is a simple API for creating such emails, + then this class will probably suffice. If on the other hand + you're after a higher degree of control over the email, then + you might want to look at using <filename>mimePart.php</filename>. </simpara> </refsect1> <refsect1> <title>constructor</title> <simpara> - The constructor takes only one argument, and that is the type of - line end to use. The standard for this is CRLF, however *nix - commonly uses LF and Macs CR. + The constructor takes only one argument, and that is the type of + line end to use. The standard for this is CRLF, however *nix + commonly uses LF and Macs CR. </simpara> </refsect1> <refsect1> - <title><function>setTXTBody</function></title> + <title><function>setTXTBody</function></title> <simpara> This function sets the plain text part of the email. It takes - two arguments: + two arguments: </simpara> <para> <itemizedlist> <listitem> <para> - <parameter>$data</parameter> - Either the text to set, or a filename of a text file - to use. + <parameter>$data</parameter> - Either the text to set, or a + filename of a text file to use. </para> </listitem> <listitem> <para> - <parameter>$isfile</parameter> - Optional. If true, then $data is assumed to be a - filename and read in- + <parameter>$isfile</parameter> - Optional. If true, then + <parameter>$data</parameter> is assumed to be a filename and + read in. </para> </listitem> </itemizedlist> </para> </refsect1> <refsect1> - <title><function>setHTMLBody</function></title> + <title><function>setHTMLBody</function></title> <simpara> This function sets the HTML part of the email. It takes - two arguments: + two arguments: </simpara> <para> <itemizedlist> <listitem> <para> - <parameter>$data</parameter> - Either the HTML to set, or a filename of a text file - to use. + <parameter>$data</parameter> - Either the HTML to set, or a + filename of a text file to use. </para> </listitem> <listitem> <para> - <parameter>$isfile</parameter> - Optional. If true, then $data is assumed to be a - filename and read in- + <parameter>$isfile</parameter> - Optional. If true, then + <parameter>$data</parameter> is assumed to be a filename and + read in. </para> </listitem> </itemizedlist> </para> </refsect1> <refsect1> - <title><function>setHTMLImage</function></title> + <title><function>setHTMLImage</function></title> <simpara> If sending an HTML email with embedded images, use this function to add the image. It takes four arguments: @@ -390,26 +395,27 @@ <itemizedlist> <listitem> <para> - <parameter>$file</parameter> - Either a filename or the actual file data itself. + <parameter>$file</parameter> - Either a filename or the actual + file data itself. </para> </listitem> <listitem> <para> - <parameter>$c_type</parameter> - The content type of the image/file. Defaults to - application/octet-stream if not given. + <parameter>$c_type</parameter> - The content type of the + image/file. Defaults to application/octet-stream if not given. </para> </listitem> <listitem> <para> - <parameter>$name</parameter> - The filename of the image/file. Defaults to blank if - not given. + <parameter>$name</parameter> - The filename of the image/file. + Defaults to blank if not given. </para> </listitem> <listitem> <para> - <parameter>$isfilename</parameter> - Whether the $file argument is a filename or not. - If true, the file will be read in Defaults to true if not - given. + <parameter>$isfilename</parameter> - Whether the <parameter> + $file</parameter> argument is a filename or not. If true, the + file will be read in. Defaults to true if not given. </para> </listitem> </itemizedlist> @@ -429,33 +435,35 @@ <itemizedlist> <listitem> <para> - <parameter>$file</parameter> - Either a filename or the actual file data itself. + <parameter>$file</parameter> - Either a filename or the actual + file data itself. </para> </listitem> <listitem> <para> - <parameter>$c_type</parameter> - Content type of the file. Defaults to - application/octet-stream if not given. + <parameter>$c_type</parameter> - Content type of the file. + Defaults to application/octet-stream if not given. </para> </listitem> <listitem> <para> - <parameter>$name</parameter> - The filename of the file. Defaults to blank if not - given. + <parameter>$name</parameter> - The filename of the file. + Defaults to blank if not given. </para> </listitem> <listitem> <para> - <parameter>$isfilename</parameter> - Whether the $file argument is a filename or not. - If true, the file will be read in Defaults to true if not - given. + <parameter>$isfilename</parameter> - Whether the <parameter> + $file</parameter> argument is a filename or not. If true, the + file will be read in Defaults to true if not given. </para> </listitem> <listitem> <para> - <parameter>$encoding</parameter> - Type of transfer encoding to use for the file data. - Defaults to base64 if not given For text based files - (eg. scripts/html etc) this could be given as quoted-printable. + <parameter>$encoding</parameter> - Type of transfer encoding + to use for the file data. Defaults to base64 if not given. for + text based files (eg. scripts/html etc) this could be given as + quoted-printable. </para> </listitem> </itemizedlist> @@ -473,40 +481,41 @@ <link linkend="core.mail.smtp">Mail_smtp</link> classes described elsewhere in this documentation. It takes one argument only, which is an associative array of parameters. These - parameters affect the way the email is built and can consist of: + parameters affect the way the email is built and can consist of: </simpara> <para> <itemizedlist> <listitem> <para> - <parameter>$text_encoding</parameter> - Type of encoding to use for the plain text - part of the email. Default is 7bit. + <parameter>$text_encoding</parameter> - Type of encoding to + use for the plain text part of the email. Default is 7bit. </para> </listitem> <listitem> <para> - <parameter>$html_encoding</parameter> - Type of encoding for the HTML part of the - email. Default is quoted-printable. + <parameter>$html_encoding</parameter> - Type of encoding for + the HTML part of the email. Default is quoted-printable. </para> </listitem> <listitem> <para> - <parameter>$7bit_wrap</parameter> - Number of characters after which text is wrapped. - SMTP stipulates maximum line length of 1000 characters - including CRLF. Default is 998 (CRLF is appended to make up to - 1000). + <parameter>$7bit_wrap</parameter> - Number of characters + after which text is wrapped. SMTP stipulates maximum line + length of 1000 characters including CRLF. Default is 998 + (CRLF is appended to make up to 1000). </para> </listitem> <listitem> <para> - <parameter>$text_charset</parameter> - The character set to use for the plain text - part of the email. Default is iso-8859-1. + <parameter>$text_charset</parameter> - The character set to + use for the plain text part of the email. Default is + iso-8859-1. </para> </listitem> <listitem> <para> - <parameter>$html_charset</parameter> - The character set to use for the HTML part of - the email. Default is iso-8859-1. + <parameter>$html_charset</parameter> - The character set to + use for the HTML part of the email. Default is iso-8859-1. </para> </listitem> </itemizedlist> @@ -553,7 +562,7 @@ $hdrs =& $mime->headers($hdrs); $mail =& Mail::factory('mail'); -$mail->send('joe@example.com', $hdrs, $body); +$mail->send('joe@example.com', $hdrs, $body); ]]> </programlisting> </refsect1> @@ -583,9 +592,9 @@ true, then the headers will be decoded (RFC2047). </para> <para> - <emphasis>ctype_primary:</emphasis> The first part of the - content type (ie. before the forward slash). Eg. If the content - type is multipart/mixed, ctype_primary would be "multipart" + <emphasis>ctype_primary:</emphasis> The first part of the + content type (ie. before the forward slash). Eg. If the content + type is multipart/mixed, ctype_primary would be "multipart" (no quotes). </para> <para> @@ -656,7 +665,7 @@ <simpara> This function performs the decoding and returns the structure as detailed above. It takes just one argument which is an - associative array of parameters. These parameters can consist of: + associative array of parameters. These parameters can consist of: </simpara> <itemizedlist> <listitem> @@ -701,7 +710,7 @@ return them in an associative array containing the file data, file perms and file name. It takes only one argument, that being the input to look at. This function can be called statically, - even if you do not use the rest of the classes functionality. + even if you do not use the rest of the classes functionality. </simpara> </refsect1> <refsect1> @@ -713,7 +722,7 @@ http://www.phpguru.org/xmail/ or with the PEAR mime package (when it is available). The method takes only one argument, and that is the returned data from the <function>decode - </function> method. + </function> method. </simpara> </refsect1> <refsect1> @@ -730,9 +739,9 @@ $params['decode_headers'] = TRUE; $decoder = new Mail_mimeDecode($input); -$structure = $decoder->decode($params); +$structure = $decoder->decode($params); </programlisting> - + <para> This example calls the decode function statically (ie no object, straight function call) and then passes the structure to the