我有一个流程,在注册到我的网站后会向用户发送带有确认链接的电子邮件。但是邮件会进入垃圾邮件文件夹。我尝试了许多来自互联网的代码,但似乎没有一个有效。任何帮助,将不胜感激。
这是我的代码:
/** Check Spam**/
$mailcheck = spamcheck($_POST['email']);
if ($mailcheck == FALSE) {
browse ("Invalid input");
}else{
$to = $email;
$subject = "Please Verify Your Email Address";
$header = "From: example@example.com";
$message.= "Please Click On The Link Below To Confirm Your Email Address With Us";
$message.=" ";
$message.= "www.mylink.com/subdomain/verification.php?user_verification=$code";
$sendmail = mail($to,$subject,$message,$header);