You need to call the AddAddress method once for each recipient. For example:
$mail->AddAddress('person1@domain.com', 'Person One'); $mail->AddAddress('person2@domain.com', 'Person Two');
Better yet, add them as Carbon Copy recipients.
$mail->AddCC('person1@domain.com', 'Person One'); $mail->AddCC('person2@domain.com', 'Person Two');
To make everything simple, you must skip the array to do this.
$recipients = array( 'person1@domain.com' => 'Person One', 'person2@domain.com' => 'Person Two', // .. ); foreach($recipients as $email => $name) { $mail->AddCC($email, $name); }
Alan Orozco Jun 30 '10 at 13:10 2010-06-30 13:10
source share