Mail() 在 windows server2003 中无法发送
我在 Windows Server 2003 中安装了 PHP。除了邮件问题之外,所有文件都工作正常。 SMTP没有问题。 因为我在同一台服务器上运行JSP项目。该邮件功能工作正常。 那么问题出在哪里呢? 我该如何管理? 我在 PHP 中将 SMTP 服务器设置为
; For Win32 only.
SMTP = localhost
smtp_port = 25
I installed PHP in windows server 2003. All the files are working fine except the mail issue. There is no problem in SMTP. Because I run the JSP project in the same server.In that mail function working fine. So where is the problem? And how can i manage? I set the SMTP server in PHP as
; For Win32 only.
SMTP = localhost
smtp_port = 25
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
SMTP服务需要认证吗? 也许 JSP 代码中有一个针对 SMTP 服务器进行身份验证的设置? 您可以查看 JSP 代码以查看是否存在不同的 SMTP 配置。
另一个原因可能是 SMTP 只允许特定的发件人地址/域。 PHP 和 JSP 应用程序的发件人地址是否不同?
Does the SMTP service need authentication? Maybe there is a setting in the JSP code which authenticates against the SMTP server? You could look at the JSP code to see if there is a different SMTP configuration.
Another reason could be that the SMTP allows only specific sender addresses/domains. Are the sender addresses of the PHP and JSP applications different?
如果您的 smtp 服务器没有暴露并受到防火墙保护,您可以允许中继,这样就可以解决问题。
如果没有,请验证您是否可以使用 telnet 发送您想要的电子邮件
If your smtp server is not exposed and protected behind a firewall you can allow relay and that should take care of it.
If not then verify you can send the email you want using telnet