我已经关注此链接,这是我的PHP代码。我的问题是我已经尝试了很多次并且没有收到任何电子邮件。你能指出出了什么问题吗?谢谢
http://blog.techwheels.net/send-email-from-localhost-wamp-server-using-sendmail/
if($result)
{
$to = $email;
$subject = "Your comfirmation email";
$header = "from: your name <your email>";
$message = "Thank you for registering with us. You can now login to your account";
if(mail($to, $subject,$header,$message))
{
echo 'Your Confirmation Email Has Been Sent To Your Email Address.
<a href="login.php">Click here to Login</a>';
}
else
{
echo 'Cannot send Confirmation link to your e-mail address.
<a href="login.php">Click here to Register</a>';
}
}
答案 0 :(得分:0)
您的系统上是否配置了邮件服务器?
Windows没有像* nix这样的邮件服务器。简单的答案是使用像phpMailer这样的库,它允许你使用gmail / yahoo / etc邮件帐户向你发送电子邮件。