Forum Moderators: coopster
The main() function can only handle $To, $from, $subject and some page formatting $headers. Bcc is not handled due to abuse and many servers hinder the use of it for that reason.
Therefore, I enclosed another mail() function inside another set of php open and close <? ?> tags, and instead of setting $to in it, i put $bcc in it. For the manager of the business to see where the main message was sent to, I inserted $destination_address which has the $to variable passed into it.
It works great.
-----------------------------------------------
------------------------------------------------
$headers .= "From: \"$from\"\r\n";
$destination_address = "To: \"$to\"\r\n";
// main email
mail($to, $subject, $message, $headers, "MINE-Version: 1.0"."Content-type: text/html; charset=iso-8859-1");
?>
<?php echo $ip;
// blind carbon copy:
mail( $bcc_email, $destination_address, $subject, $message, "MINE-Version: 1.0"."Content-type: text/html; charset=iso-8859-1"); ?>