Alhazred
April 16th, 2009, 02:40 PM
I need to send the same email in plain text format to several users.
I can do that, but there is a problem: those users who use a gmail account (and only them) can see the email addresses in the Bcc field.
Is there a way to hide those addresses to gmail users?
This is my code
$i=0;
while($row = mysql_fetch_array($addresses)) {
if($i==0) //first addres into the field To:
$receiver = $row['email'];
else //others into Bcc
$bcc .= $row['email'].", ";
$i++;
}
$header .= "MIME-Version: 1.0\r\n";
$header .= "Content-type: text; charset=iso-8859-1\r\n";
$header .= "From: My site <email@mysite.com> \r\n";
$header .= "Bcc: ".$bcc."\r\n";
$object = "email's object";
$message = "email's text.\r\n";
mail($receiver, $object, $message, $header);
I can do that, but there is a problem: those users who use a gmail account (and only them) can see the email addresses in the Bcc field.
Is there a way to hide those addresses to gmail users?
This is my code
$i=0;
while($row = mysql_fetch_array($addresses)) {
if($i==0) //first addres into the field To:
$receiver = $row['email'];
else //others into Bcc
$bcc .= $row['email'].", ";
$i++;
}
$header .= "MIME-Version: 1.0\r\n";
$header .= "Content-type: text; charset=iso-8859-1\r\n";
$header .= "From: My site <email@mysite.com> \r\n";
$header .= "Bcc: ".$bcc."\r\n";
$object = "email's object";
$message = "email's text.\r\n";
mail($receiver, $object, $message, $header);