ZF-928: Zend_Mail mixes To: and Bcc: headers on multiple Bcc
Again, this is an issue that was previously reported to the fw-general list and is still not fixed in r3503. Sorry about not reporting it earlier as an issue. I think this is a major misbehavior of Zend_Mail and if possible should be fixed before the 0.8 release.
given the following code:
$mail = new Zend_Mail(); $mail->setSubject('my subject'); $mail->setBodyText('my body'); $mail->setFrom('firstname.lastname@example.org'); $mail->addTo('email@example.com'); $mail->addBcc('firstname.lastname@example.org'); $mail->addBcc('email@example.com'); //print_r($mail); $mail->send();
The print_r($mail) output before sending the mail looks fine:
[_headers:protected] => Array ( [Subject] => Array (  => my subject ) [From] => Array (  => "" [append] => 1 ) [To] => Array (  => [append] => 1 ) [Bcc] => Array (  => [append] => 1  => ) )
The resulting email got the following messed up header:
I neither received the mail on firstname.lastname@example.org nor on email@example.com