0

下面是我的代码,我从地址作为网络管理员的邮件 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);
     ?>
4

2 回答 2

5

你要这个。注意更改为第 2 行

<?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);
     ?>
于 2013-11-08T16:22:44.630 回答
3

忘记了字符串附加连接运算符 (.):

$headers .= 'BCC: '."raji@nexegen.net"."\r\n";

于 2013-11-08T16:24:04.727 回答