我的服务器端文件有问题
我尝试发送电子邮件,但在邮箱中没有找到任何内容
<?
$from = 'faresbenslama95@gmail.com';
$to_email = 'faresbenslama95@gmail.com';
$subject = 'Testing PHP Mail';
$message = 'This mail is sent using the PHP mail function';
$headers = "MIME-Version: 1.0" . "\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1" . "\r\n";
$headers .= "From: " . $from . "\r\n";
$headers .= "Reply-To: " . $from . "\r\n";
$headers .= "X-Mailer: PHP/" . phpversion();
$headers .= "X-Priority: 1" . "\r\n";
mail('faresbenslama95@gmail.com', $subject, $message, $headers);
?>
我希望收到电子邮件,但没有收到消息。
答案 0 :(得分:0)
您是否在开始时就错过了提案上的php或只是展示了示例。代码看起来不错