Home >Backend Development >PHP Tutorial > 那个大侠用php+smtp发过邮件?请指点一下解决方案

那个大侠用php+smtp发过邮件?请指点一下解决方案

WBOY
WBOYOriginal
2016-06-13 13:53:14848browse

那个大侠用php+smtp发过邮件?请指点一下
我的服务器上装了sendmail,用mail可以发送,测试,qq第三次收到是在垃圾邮件?163收不到?
请问为什么?

$to = "test*****@qq.com";
$subject = "Test mail";
$message = "Hello! This is a simple email message.";
$from = "test*****@qq.com";
$headers = "From: $from";
mail($to,$subject,$message,$headers);
echo "Mail Sent.";
?>

------解决方案--------------------
能收到。说明发信没问题,可能被163拦截了。多测试下。
------解决方案--------------------
使用系统自带的sendmail服务都这样,都会有垃圾邮件的嫌疑。最好使用第三方的smtp来发送,网上很多开源的库

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn