简体   繁体   English

Mail()不会在Windows Server2003中发送

[英]Mail() won't send in windows server2003

I installed PHP in windows server 2003. All the files are working fine except the mail issue. 我在Windows Server 2003中安装了PHP。除邮件问题外,所有文件都工作正常。 There is no problem in SMTP. SMTP中没有问题。 Because I run the JSP project in the same server.In that mail function working fine. 因为我在同一台服务器上运行JSP项目,所以在该邮件功能中工作正常。 So where is the problem? 那么问题出在哪里呢? And how can i manage? 我该如何管理? I set the SMTP server in PHP as 我在PHP中将SMTP服务器设置为

; For Win32 only.
SMTP = localhost
smtp_port = 25

Does the SMTP service need authentication? SMTP服务需要身份验证吗? Maybe there is a setting in the JSP code which authenticates against the SMTP server? 也许JSP代码中有一个设置可以针对SMTP服务器进行身份验证? You could look at the JSP code to see if there is a different SMTP configuration. 您可以查看JSP代码以查看是否存在不同的SMTP配置。

Another reason could be that the SMTP allows only specific sender addresses/domains. 另一个原因可能是SMTP仅允许特定的发件人地址/域。 Are the sender addresses of the PHP and JSP applications different? PHP和JSP应用程序的发送者地址是否不同?

If your smtp server is not exposed and protected behind a firewall you can allow relay and that should take care of it. 如果您的smtp服务器没有暴露在防火墙的保护之下,那么您可以允许中继,并且应该加以保护。

If not then verify you can send the email you want using telnet 如果没有,请确认您可以使用telnet发送您想要的电子邮件

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM