* Marc Serra <[EMAIL PROTECTED]>:
> i'm using Mail PEAR package and i want to send a mail to a recipient and
> to some other in Cc.
> So i try to add Cc in header but it failed and mail didn't been
> delivered to Cc. It was only delivered to adress specified in From field.
>
> I use that code :
>
>
> $hdrs = array(
> "From" => "[EMAIL PROTECTED]",
> "Cc" => "[EMAIL PROTECTED]"
^
Need a comma at the end of that line.
> "Subject" => "Tests"
> );
> $mime = new Mail_mime($crlf);
> $mime->setHTMLBody(stripslashes($html));
> $body = $mime->get();
> $hdrs = $mime->headers($hdrs);
> $mail =& Mail::factory('smtp',$params);
> $mail->send($recipients, $hdrs, $body);
What is $recipients? Is it an array with both [EMAIL PROTECTED] and
[EMAIL PROTECTED] or a comma-separated string with both addresses?
Those are the two accepted forms for the first argument to the send()
method. The common pitfall I run into is that I forget to add the Cc
and/or Bcc elements to it before sending -- which means they do not get
delivered.
--
Matthew Weier O'Phinney | mailto:[EMAIL PROTECTED]
Webmaster and IT Specialist | http://www.garden.org
National Gardening Association | http://www.kidsgardening.com
802-863-5251 x156 | http://nationalgardenmonth.org
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php