PEAR::Mail CC - strange behaviour
| From: | Jeroen Houben | Date: | Thu, 09 Jun 2005 12:09:14 +0000 |
| Subject: | PEAR::Mail CC - strange behaviour | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-19569@lists.php.net to get a copy of this message | ||
Hi,
I think there is some non intuitive behaviour in PEAR::Mail.
This will work fine
$body = 'test';
$headers['To'] = 'mail@domain1.com'; $headers['Cc'] = 'mail@domain2.com'; $headers['From'] = 'from@domain3.com';$headers['Subject'] = 'test'; $result = $mailer->send(array($headers['To'], $headers['Cc']) , $headers, $body); but this won't, it will not send anything to the CC $body = 'test';
$headers['To'] = 'mail@domain1.com'; $headers['Cc'] = 'mail@domain2.com'; $headers['From'] = 'from@domain3.com';$headers['Subject'] = 'test'; $result = $mailer->send($headers['To'], $headers, $body); What I conclude form this is that you have to specify all recipients in the first parameter, even the ones in CC and BCC. This seems a bit strange to me and IIRC this is not the way PHP's mail() function behaves. Jeroen