Привет, я пытаюсь добавить BCC в функцию почты, но это не работает. кто-нибудь может помочь??? Вот мой код.
<?php
if(isset($_REQUEST['submit'])){
$cleanedFrom = $_POST['mailtxt'];
$to ='[email protected]';
$subject = 'Booking Form';
$headers = "From: " . $cleanedFrom . "\r\n";
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n";
$message= '<html><body>';
$message .= "</table>";
$message .= "</body></html>";
$headers .= "BCC: [email protected];\r\n";
$send = mail($to, $subject, $message, $headers);
$send = mail ("[email protected]", $subject, $message, $headers);
if($send)
{
echo "<script> window.location = 'wwww.mysite.com' </script>";}
else
{
echo "<script> window.location = 'index.html' </script>";
}
}
?>
PHPMailer
, который был разработан для таких вещей. - person Darren   schedule 28.01.2015$headers .= 'Bcc: [email protected]' . "\r\n";
без точки с запятой после адреса... и т.д.? Это копия из мануала - person Rasclatt   schedule 28.01.2015if ( preg_match( "/[\r\n]/", $cleanedFrom )) die('injection detected');
- person Mario A   schedule 28.01.2015