`
lcffufly
  • 浏览: 33730 次
  • 性别: Icon_minigender_1
  • 来自: 杭州
社区版块
存档分类
最新评论

解决:mail() : Failed to connect to mailserver at "127.0.0.1" port 25

    博客分类:
  • php
 
阅读更多
当出现:
warning: mail() [function.mail]: Failed to connect to mailserver at "127.0.0.1" 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 persis
ts.
或出现:
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 zf1315@sina.com。。。的错误)
测试一下:
<?php
mail("linchangfu@126.com","测试","测试是否收到");
?>
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics