PHPMailer AddAddress()

You need to call the AddAddress function once for each E-Mail address you want to send to. There are only two arguments for this function: recipient_email_address and recipient_name. The recipient name is optional and will not be used if not present.

$mailer->AddAddress('recipient1@example.com', 'First Name');
$mailer->AddAddress('recipient2@example.com', 'Second Name');
$mailer->AddAddress('recipient3@example.com', 'Third Name');

You could use an array to store the recipients and then use a for loop.

Leave a Comment