当我尝试从php文件发送带有ajax的电子邮件时,我收到了上述警告。我正在尝试代码:
$to = "suman5571@gmail.com";
$subject = "This is subject";
$message = "<b>This is HTML message.</b>";
$message .= "<h1>This is headline.</h1>";
$header = "From:suman5571@gmail.com \r\n";
$header = "Cc:dhillon0jags@gmail.com \r\n";
$header .= "MIME-Version: 1.0\r\n";
$header .= "Content-type: text/html\r\n";
$retval = mail ($to,$subject,$message,$header);
if( $retval == true ) {
echo '1';
} else {
echo '0';
}
答案 0 :(得分:0)
您应该在php中检查sendmail_path设置。还要检查程序是否存在并已安装。