下面是我的代码,我从地址获得的是网站管理员的邮件ID
<?php
$headers = 'From: '."raji@nexegen.net"."\r\n";
$headers = 'BCC: '."raji@nexegen.net"."\r\n";
$headers .= 'Reply-To: '.$email."\r\n";
$headers .= "MIME-Version: 1.0" . "\r\n";
$headers .= "Content-type:text/html;charset=iso-8859-1" . "\r\n";
$mail_status = mail("raji@nexegen.net", "hii", "nothing", $headers);
?>
答案 0 :(得分:5)
你想要这个。注意改为第二行
<?php
$headers = 'From: '."raji@nexegen.net"."\r\n";
$headers .= 'BCC: '."raji@nexegen.net"."\r\n";
$headers .= 'Reply-To: '.$email."\r\n";
$headers .= "MIME-Version: 1.0" . "\r\n";
$headers .= "Content-type:text/html;charset=iso-8859-1" . "\r\n";
$mail_status = mail("raji@nexegen.net", "hii", "nothing", $headers);
?>
答案 1 :(得分:3)
忘记字符串追加连接运算符(。):
$headers .= 'BCC: '."raji@nexegen.net"."\r\n";