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

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

WBOY
Release: 2016-06-13 10:00:49
Original
829 people have browsed it

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

$to = "[email protected]";
$subject = "Test mail";
$message = "Hello! This is a simple email message.";
$from = "[email protected]";
$headers = "From: $from";
mail($to,$subject,$message,$headers);
echo "Mail Sent.";
?>

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

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template