【发布时间】:2010-12-20 15:57:33
【问题描述】:
嘿,我已经设置了下面的一段代码来向订阅者发送验证电子邮件。但它似乎没有到达他们(我自己测试它)我正在使用http://localhost/ 来测试该站点,不知道这是否是问题所在。此外,我收到了验证电子邮件已发送的消息,因此应该发送。代码如下:
if(mysql_query("insert into users(username,password,email,fname,lname,hash) values('$username','$password','$email','$fname','$lname','$hash')")or die (mysql_error ())){
echo "Welcome, You have successfully signed up. Please check the verification e-mail sent to you.";
$to = $email;
$subject = 'Signup | Verification';
$message = '
Thanks for signing up!
Your account has been created, you can login with the following credentials after you have activated your account by pressing the url below.
------------------------
Username: '.$username.'
Password: '.$password.'
------------------------
Please click this link to activate your account:
http://www.JMtoday.com/verify.php?email='.$email.'&hash='.$hash.'
';
$headers = 'From:noreply@JMtoday.com' . "\r\n";
mail($to, $subject, $message, $headers);
}
【问题讨论】:
-
我的用户名将是 ', '', '', '', '', '');截断表用户;--
标签: php