铝扣板窗帘盒:请问php中的mail函数有用吗?为啥我测试总是不成功?

来源:百度文库 编辑:中科新闻网 时间:2024/05/09 19:13:02
我的测试代码如下~~要把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服务器.

你的服务器支持才管用。