Hello
I am new to DaniWeb so please be gentle! I am also extremely new to PHP. Other than a couple of introduction classes I have not had much exposure...I am really trying though. Never the less, I have a web client that wants to be able to have his email address BCC to him so that the managers of his restaurants do not know that he receives the emails as well. When I took over these sites, the PHP script was already written. I have added what I thought it would take to receive BCC'ed email. I tested it with my email address and never received the email. Could someone please look over the following code and clue me in?
I have bolded and underlined the code that I have included.
Thank You!!!
<?
if (isset($_REQUEST["email"]))
{
$dest = "user1@example.com, [email]user2@example.com[/email], [email]user3@example.com[/email], [email]user4@example.com[/email], [email]user5@example.com[/email] ";
[B][U]$headers = "Bcc: [email]bccrecipient@example.com[/email]";[/U][/B]
$subject = "Meridian Restaurant & Bar Contact Form";
$msgbody = "Meridian Restaurant & Bar Contact Form\r\n\r\n";
$msgbody .= "Name: ".$_REQUEST["name"]."\r\n";
$msgbody .= "Email: ".$_REQUEST["email"]."\r\n";
$msgbody .= "\r\n\r\n";
$msgbody .= "Comments:\r\n\r\n".$_REQUEST["comments"]."\r\n";
$msgbody = stripslashes($msgbody);
mail($dest,$subject,$msgbody,[B][U]$headers[/U][/B], "From: ".$_REQUEST["name"]." <".$_REQUEST["email"].">\r\nReply-to: ".$_REQUEST["email"]."\r\n");
header("location:thanks.htm");
}
?>
The parts I have added are highlighted: