You can use the native mail() function, separate the addresses with a comma, and put them all in the blind carbon copy list with additional headers.
$to = "[email protected],[email protected]";
$subject = "Mini-mass Emailer";
$message = "Hello World";
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$headers .= 'From: Your Name <[email protected]>' . "\r\n";
$headers .= 'Bcc: {$to}' . "\r\n";
mail($to, $subject, $message, $headers);
Or you could iterate over the collection of email addresses and send each message individually:
$emails = array("[email protected]","[email protected]");
foreach ($emails as $email) {
$to = $email;
$subject = "My Subject";
$message = "Hello World";
mail($to, $subject, $message);
}