warning: mail() [
function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in E:\TOOL\Apache\htdocs\rzchina_beta\club\includes\mail.inc on line 193.
Unable to send e-mail. Please contact the site administrator if the problem persists.
或出现:
mail(): SMTP server response: 550 5.7.1 Unable to relay for错误。
解决办法:
安装IIS自带的SMTP,在SMTP虚拟服务器上点击右键,在弹出的属性窗口里进行如下设置:
点击访问选项卡,再点击中继,在弹出的窗口出点击添加,然后选单台计算机,添加IP地址为 127.0.0.1。然后一路确定返回。(不进行此项设置,可能会出现:SMTP server response: 550 5.7.1 Unable to relay for 。。。的错误)
测试一下:
<?php
mail("zf1315@sina.com","测试","测试是否收到");
?>
当出现: