ding 我以前用的是机器自带的sendmail,现在发现在win32下用别的smtp服务器 也不行了 Warning: mail() [function.mail]: Failed to connect to mailserver at "ah163.com" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in c:\inetpub\wwwroot\xx.php on line 4
php的mail函数可以直接与SMTP沟通,这也就是php.ini中要设置SMTP参数的原因。所以,用asp能发邮件并不能表示SMTP是完好的,只有用outlook或foxmail发邮件才能发现问题
; For Win32 only.
SMTP = localhost; For Win32 only.
sendmail_from = [email protected]
这个是配置,但我发现我用outlook时,如果不选择我的服务器需要身份验证的话,就会出现如下错误
由于服务器拒绝收件人之一,无法发送邮件。被拒绝的电子邮件地址是“[email protected]”。 主题 'fsda', 帐户: '192.168.0.9', 服务器: '192.168.0.9', 协议: SMTP, 服务器响应: '550 5.7.1 Unable to relay for [email protected]', 端口: 25, 安全(SSL): 否, 服务器错误: 550, 错误号: 0x800CCC79
如果验证的话就可以发送了,并且发送的时候需要输入本机的用户名和密码。
我在想这跟stmp设置是否有关,我安装好了就没有动过,全部是默认的,不知是什么原因。并且同样配置在我公司其它的电脑也是这个错误,谢谢。
sendmail_from = [email protected]
最好把[email protected]改成外部的真实的E-mail。
最好把[email protected]改成外部的真实的E-mail。
这个还是不行,我再顶,我问一下,这个到底可不可以实现,在winnt下面,谢谢
看下SMTP server 是否允许转发。
有这个先项吗,我没有找到啊
我以前用的是机器自带的sendmail,现在发现在win32下用别的smtp服务器
也不行了
Warning: mail() [function.mail]: Failed to connect to mailserver at "ah163.com" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in c:\inetpub\wwwroot\xx.php on line 4
$message="abcdefghijklmnopqrstuvwxyz";
mail("[email protected]", "没有主题", $message, "From: [email protected]\nReply-To: [email protected]\nX-Mailer: html/" . phpversion());
?>