厦门市同安区邮政编码:请问php中的mail函数有用吗?为啥我测试总是不成功?

来源:百度文库 编辑:高考问答 时间:2024/07/02 18:38:15
我的测试代码如下~~要把test送往'peopleconnected@yahoo.com.cn'

<?php

$toaddress='peopleconnected@yahoo.com.cn';
$subject='Freeback from website';
$mailcontent='test';
$fromaddress='from: williamdeforest@hotmail.com';

mail($toaddress,$subject,$mailcontent,$fromaddress);

echo 'Sucess';

?>

如果是在WINDOWS下的话,你可能需要在PHP.INI中配制一下SMTP服务器.

你的服务器支持才管用。