Either use setCC
directly ( documentation ) ...
$message->setCc(array(
'person1@example.org',
'person2@otherdomain.org' => 'Person 2 Name',
'person3@example.org',
'person4@example.org',
'person5@example.org' => 'Person 5 Name'
));
... or loop over your collection of entites and execute addCC
for each of them.
$receipients = $this->getDoctrine()->getRepository("...")->findBy(array(".." => ".."));
foreach ($receipients as $receipient) {
$message->addCC($receipient->getMail());
}
$this->get('mailer')->send($message);
... or if you only have the ,
-separated string with the cc adresses available just explode
the string to an array. and afterwards loop over the array elements or pass the array directly to setCC
as shown above.