Supongamos el siguiente ejemplo de Zend_Mail
$mail = new Zend_Mail() $mail->setBodyText('This is the text of the mail.'); $mail->setFrom('somebody@example.com', 'Some Sender'); $mail->addTo('somebody_else@example.com', 'Some Recipient'); $mail->addCc('somebody_else@example.com', 'Some Recipient'); $mail->addBcc('somebody_else@example.com', 'Some Recipient'); $mail->setSubject('TestSubject'); $mail->send();
Si queremos agregar mas de un destinatario al addTo(), addCc() y al addBcc() lo podemos hacer por medio de un array de direcciones de correo. En el caso del addTo() y el addCc(), estas arrays pueden ser asociativas, y en estas la key es el nombre del destinatario. Es decir:
$toRecipients = array('Some Recipient' => 'somebody_else@example.com', 'Other' => 'other@example.com'); $hideRecipients = array('one@example.com', 'two@example.com'); $mail->addTo($toRecipients); $mail->addCc($toRecipients); $mail->addBcc($hideRecipients);
+ Información: http://framework.zend.com/manual/1.12/en/zend.mail.adding-recipients.html