I am generating an automatically email successfully using the code below, where all the email addresses are contained in the variable $to.
How do I change the code below to send all of these emails as a bcc so that their email addresses are not disclosed to one another?
If necessary I can just have my email address in $to and all the bcc addresses in $blindcopy
// $to contains approx 30 email addresses $subject = '*****NEW RECORD ADDED TO THE DATABASE*****'; $message = $id; $headers = 'From: email@example.com' . "\r\n" . 'Reply-To: firstname.lastname@example.org' . "\r\n" . 'Content-type: text/html; charset=iso-8859-1\r\n'. 'X-Mailer: PHP/' . phpversion(); mail($to, $subject, $message, $headers);
Many thanks to all those that took time to respond.