成功注册后,我正在尝试向用户发送电子邮件。所以下面是我的 .php 代码。
$to = $email;
$subject = "Signup | Verification";
$message = "Congratulation $f_name $l_name you have been successfully registered. Please
click the link to active your account.\r\n";
$message .= "http://www.maaks.fr/hotel/verify.php?email=$email&hash=$hash\r\n";
$from = "noreply@yoursite.com";
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-rype: text/html; charset=iso-8859-1\r\n";
$headers .= "Content-Transfer-Encoding; 7bit\r\n";
$headers = "From:" . $from . "\r\n";
$sentmail = mail($to,$subject,$message,$headers);
if($sentmail)
{
header("Location: thankyou.php?member=successfully");
exit();
}
它不会向用户发送电子邮件。我检查了一下,如果$sentmail 没问题,那就是感谢页面。但有趣的是,它没有发送电子邮件就进入了感谢页面。
有什么我忘记了吗?