php的mail()函数出错的问题

!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN xmlns=
content=text/html; charset=utf-8 /titlephpinfo/title/headbody?$to =
atoat@sina.com;$subject = php-Mail;$msg = I completely understand SMTP
servers now!;$headers = From: atoat@163.comrnReply-To:
atoat@163.com;mail($to, $subject, $msg, $headers);echo
finished!;?/body/html出现的错误:Warning: mail() [function.mail]: SMTP
server response: 550 5.7.1 Unable to relay for atoat@sina.com in
C:webserverhtdocs on line 14php.ini配置情况[mail function]; For Win32
only.SMTP = localhostsmtp_澳门新葡亰网站注册,port = 25; For Win32 only.sendmail_from =
atoat@163.com已经安装了windows自带的smtp服务找了好久才发现需要在smtp服务的中继选项中添加本机IP地址虚拟服务器-属性-访问-中继选择仅以下列表=单台计算机=添加127.0.0.1的本地地址程序没有出现问题,但收件箱中没有立即收到信息.没有收到是因为我的机子是在内网中,不能把邮件发送到外网.解决方法:在网关做个端口映射,把25端口映射到本机.或者本机有公网IP.<