cvs: peardoc /en/package/mail/mail send.xml

From: Date: Sun, 12 Jun 2005 09:19:29 +0000
Subject: cvs: peardoc /en/package/mail/mail send.xml
Groups: php.pear.doc 
Request: Send a blank email to pear-doc+get-6304@lists.php.net to get a copy of this message
mj Sun Jun 12 05:19:29 2005 EDT Modified files: /peardoc/en/package/mail/mail send.xml Log: * Added instructions how to generate mails with Bcc recipients, this time working properly. # Bug: #4286 http://cvs.php.net/diff.php/peardoc/en/package/mail/mail/send.xml?r1=1.7&r2=1.8&ty=u Index: peardoc/en/package/mail/mail/send.xml diff -u peardoc/en/package/mail/mail/send.xml:1.7 peardoc/en/package/mail/mail/send.xml:1.8 --- peardoc/en/package/mail/mail/send.xml:1.7 Sun Jun 12 05:13:45 2005 +++ peardoc/en/package/mail/mail/send.xml Sun Jun 12 05:19:28 2005 @@ -1,4 +1,4 @@ -<!-- $Revision: 1.7 $ --> +<!-- $Revision: 1.8 $ --> <refentry id="package.mail.mail.send"> <refnamediv> <refname>Mail::send()</refname> @@ -279,7 +279,34 @@ $mail_object->send($recipients, $headers, $body); ?> - + ]]> + </programlisting> + <para> + If one wishes to specify recipients for <literal>Bcc:</literal>, + the variable <varname>recipients</varname> must be an associative + array: + </para> + <programlisting role="php"> + <![CDATA[ +<?php +include('Mail.php'); + +$recipients = array('To' => 'joe@example.com', + 'Bcc' => 'jane@example.com'); + +$headers['From'] = 'richard@example.com'; +$headers['To'] = 'joe@example.com'; +$headers['Subject'] = 'Test message'; + +$body = 'Test message'; + +$params['sendmail_path'] = '/usr/lib/sendmail'; + +// Create the mail object using the Mail::factory method +$mail_object =& Mail::factory('sendmail', $params); + +$mail_object->send($recipients, $headers, $body); +?> ]]> </programlisting> </refsect1>

« previous php.pear.doc (#6304) next »