I am trying to edit this script to send a Bcc copy to myself:
$to = $your_email;
$from = "Server Xt<dml_submitbot@noemail.com>";
$subject = "User Sent Msg :: $msg";
$HTMLmessage = $message;
emailHTML($to, $from, $subject, $HTMLmessage);
function emailHTML($to, $from, $subject, $HTMLmessage){
$semi_rand = md5(time());
$mime_boundary = "==Multipart_Boundary_x{$semi_rand}x";
$headers = "From: ".$from;
$headers .=
"\nMIME-Version: 1.0\n" .
"Content-Type: multipart/mixed;\n" .
" boundary=\"{$mime_boundary}\"";
$content .=
"This is a multi-part message in MIME format.\n\n" .
"--{$mime_boundary}\n" .
"Content-Type:text/html; charset=\"iso-8859-1\"\n" .
"Content-Transfer-Encoding: 7bit\n\n" .
$HTMLmessage . "\n\n";
$ok = @mail($to, $subject, $content, $headers);
if(!$ok) {
die("Error sending email");
}
}
i have tried to add this $headers .= "Bcc:email@example.com"\n";
but it does not send out the email... How do I go about modofying this script to make it work?