您好我正在尝试将BCC添加到邮件功能但它不起作用。任何人都可以请帮忙??? 这是我的代码。
<?php
if(isset($_REQUEST['submit'])){
$cleanedFrom = $_POST['mailtxt'];
$to ='abcd@abc.com';
$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: abc@abc.com;\r\n";
$send = mail($to, $subject, $message, $headers);
$send = mail ("info@visitkullumanali.com", $subject, $message, $headers);
if($send)
{
echo "<script> window.location = 'wwww.mysite.com' </script>";}
else
{
echo "<script> window.location = 'index.html' </script>";
}
}
&GT;
答案 0 :(得分:1)
$headers .= "BCC: abc@abc.com;\r\n";
从;
值
Bcc
$headers .= "Bcc: abc@abc.com\r\n";
答案 1 :(得分:0)
答案 2 :(得分:0)
你错过了一个重点:
如果你想BCC通过“To:”添加接收器,而不是标题。人们只能通过标题信息查看谁也收到了邮件。所以你可以通过“To:”
添加它