I have a mailer function, which sends mail to recipients extracted from database. How can I hide other recipients? BCC doesn't work. Mailer source:
$to=array();
while($row = mysql_fetch_array($subscrquery)) {
array_push($to, $row['subscr_mail']);
}
$msgheader=$ttl;
$mailheaders = "MIME-Version: 1.0\r\n";
$mailheaders .= "Content-type: text/html; charset=UTF-8\r\n";
$mailheaders .= "From: ".$sender." <".$sender.">\r\n";
$mailheaders .= "Reply-To: ".$sender." <".$sender.">\r\n";
$mailheaders .= "Bcc: ".implode(',', $to)."\r\n";
$mailmsga .= stripslashes($mailcontent);
$mailmsg .= strtr($mailmsga, array("<" => "\n<"));
mail(implode(',', $to), $msgheader,$mailmsg,$mailheaders);