...starts with call for data then chuck dat thru a while loop to separate the users into two categories--and adding the email address to string variable used to fill the bcc header...
while($collid=mysql_fetch_row($result2))
{if ($collid[1] != 'none@yet.com'){
if ($collid[2]= 2)
{
if ($thanks_addies="start")
{$thanks_addies =$collid[1];}
else
{$thanks_addies .=",".$collid[1];}
}
else
{
if($remind_addies="start")
{$remind_addies =$collid[1];}
else
{$remind_addies .=",".$collid[1];}
}}}
//create headers for both mails
$header = "From: support@the.com\r\n";
$header .= "Reply-To: support@the.com\r\n";
$header .= "X-Sender: support@the.com\r\n";
$header .= "MIME-Version: 1.0\r\n";
$header .= "Content-Type: text/plain; charset=iso-8859-1\r\n";
$header .= "X-Priority: 3\r\n";
$header .= "X-Mailer: PHP / ".phpversion()."\r\n";
$header .= "cc: support@the.com\r\n";
//create each message with the appropriate data
// --msg is for the thankyou....
$msg:
// --msg2 is for the reminder.....
$msg2;
$email="support@the.com";
$header1 =$header;
if ($thanks_addies != "start")
{$header1.= "bcc: ".$thanks_addies." \r\n";
$subject="Thank you for your report";
echo $header1."\t";
mail($email, $subject, $msg, $header1);
}
$header2 =$header;
if ($remind_addies != "start")
{$header2.= "bcc: ".$remind_addies." \r\n";
$subject="Reminder to report";
mail($email, $subject, $msg2, $header2);}
echo $header2."\t";
...there ya have it if it will help...
i have read that in win-php4.2.3 mail() does not support the cc or bcc headers ...so far i agree but why is there no statement in the manual to this effect.π