Home > Backend Development > PHP Tutorial > PHP发送邮件相关解决方法

PHP发送邮件相关解决方法

WBOY
Release: 2016-06-13 13:27:18
Original
802 people have browsed it

PHP发送邮件相关
$to = "951313987@qq.com";
$subject = "Test mail";
$message = "Hello! This is a simple email message.";
$from = "someonelse@example.com";
$headers = "From: $from";
mail($to,$subject,$message,$headers);
echo "Mail Sent.";
?>

我是初学php者,我用上述代码发送一个邮件,但是我的邮箱里面并没有收到邮件,想知道这是为什么?我的配置是apache+php
是不是还需要修改什么东西呀?请回复的稍微详尽一些,O(∩_∩)O谢谢

------解决方案--------------------
需要配置发件服务器

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