Req #4286 [Opn->Csd]: Please Document the BCC
| From: | mj@php.net | Date: | Sun, 12 Jun 2005 09:19:32 +0000 |
| Subject: | Req #4286 [Opn->Csd]: Please Document the BCC | ||
| References: | 1 | Groups: | php.pear.doc |
| Request: | Send a blank email to pear-doc+get-6303@lists.php.net to get a copy of this message | ||
Edit report at http://pear.php.net/bugs/bug.php?id=4286&edit=1
ID: 4286
Updated by: mj@php.net
Reported By: tommyo at gmail dot com
-Status: Open
+Status: Closed
Type: Feature/Change Request
Package: Documentation
Operating System: Linux
PHP Version: 4.3.10
New Comment:
This bug has been fixed in CVS.
In case this was a documentation problem, the fix will show up at the
end of next Sunday (CET) on pear.php.net.
In case this was a pear.php.net website problem, the change will show
up on the website in short time.
Thank you for the report, and for helping us make PEAR better.
Previous Comments:
------------------------------------------------------------------------
[2005-05-05 12:32:11] tommyo at gmail dot com
Description:
------------
Hi,
After spending about an hour searching that net I finally figured out
how to add a BCC to pear mail. I had been trying to add the BBC
variable to the headers array. When finally i noticed that send() takes
a mixed type for the recipiants parameter.
I would be happy to help contribute to the documentation. I have found
myself using PEAR::Mail more and more lately and have discovered more
and more about it using trial and error and reading through the
phpdocs. I think that the community could gain alot by improving the
end user documentation here though.
Thank you!
TOM ONEILL
Reproduce code:
---------------
<?php
include('Mail.php');
//Recipents.. THis is mixed type could simply be
// $recipients = 'test@fake.com';
$recipients['To'] = 'test@fake.com';
$recipients['Bcc'] = 'toneill@sierra-bravo.com';
//Headers you wish for the end user to see. Do not put BCC here!
$headers['From'] = 'test@fake.com';
$headers['To'] = 'test@fake.com';
$headers['Subject'] = 'Test message';
//body
$body = 'Test message';
//Setup the params for the mailer
$params["host"] = 'mail.fake.com';
$params["port"] = 25;
$params["auth"] = true;
$params["username"] = 'test@fake.com';
$params["password"] = '';
// Create the mail object using the Mail::factory method
$mail_object =& Mail::factory('smtp', $params);
//send the mail
if($error = $mail_object->send($recipients, $headers, $body)){
echo "Succes";
}else{
echo "failed";
}
?>
------------------------------------------------------------------------
--
Edit this bug report at http://pear.php.net/bugs/bug.php?id=4286&edit=1