if($msg=="") {
$to = "me@whereever.com";
$subject = $mail_subject;
$body = stripslashes($mail_message);
$body .= "
---------------------------
";
$body .= "Mail sent by: " . $mail_name . " <" . $mail_email . ">
";
$header = "From: Superman <" . $to . ">
";
$header .= "Bcc: " . $blind_copy . "
";
$header .= "Content-type: text/plain; charset=us-ascii
";
$header .= "Content-Transfer-Encoding:7bit
";
$header .= "X-Mailer: PHP/" . phpversion() . "
";
$header .= "X-Priority: 1";
if(@mail($to, $subject, $body, $header)) {
$thanks = true;
$msg = "<br/><br/>Thank you for your contact, we will respond to your message as soon as possible.";
} else {
$msg = "<br/><br/>Email can not send, please try again later.";
}
}
}
$type = (!empty($_REQUEST["type"]))?$_REQUEST["type"]:"";
switch($type) {
// Other cases omitted
case "europe": $mail_subject = "Contact Europe"; $send_to = "me@yahoo.com"; $blind_copy = "bob@wherever.com,heidi@yahoo.com"; break;
}
I would like to pass the value of $blind_copy to the
$header .= "Bcc: " . $blind_copy . "
";
line of code. So far it’s not working, so i wondered if anyone else knows how to fix the syntax. I’m assuming it’s OK to have two recipients for BCC.