简体   繁体   English

Windows SMTP Server与Server 2008和PHP

[英]Windows SMTP Server with Server 2008 and PHP

For some reason the iis smtp server and php are not communicating properly. 由于某些原因,iis smtp服务器和php无法正确通信。 I have verified that the smtp is working by telneting to it and doing the mail commands and I'm able to receive an email. 我已经通过远程登录并执行邮件命令来验证了smtp是否可以正常工作,并且能够接收电子邮件。 In addition, I followed this link http://support.microsoft.com/?id=297700 and was able to receive an email. 此外,我点击了此链接http://support.microsoft.com/?id=297700并能够收到电子邮件。 But whenever I try to send email from PHP nothing happens. 但是,每当我尝试从PHP发送电子邮件时,都不会发生。 What makes this even crazier is there are no smtp logs being written. 是什么使得它甚至更疯狂,因为没有写入smtp日志。 The log files should be located at c:\\windows\\system32\\logfiles\\smtpsvc1 but the smtpsvc1 folder does not exist and there are no email messages in the drop, pickup, queue, or badmail folders under mailroot. 日志文件应位于c:\\ windows \\ system32 \\ logfiles \\ smtpsvc1,但smtpsvc1文件夹不存在,并且mailroot下的drop,pick,queue或badmail文件夹中没有电子邮件。

I'm not really sure why no logs exist for this. 我不太确定为什么没有日志存在。 I gave the Network Service user permission to that logfiles folder but to no avail. 我向网络服务用户授予了该日志文件文件夹的权限,但无济于事。 So I guess the gist of my question is how can I make PHP and iis smtp send email. 所以我想我的问题的重点是如何使PHP和iis smtp发送电子邮件。

I have the smtp configured to send email to a remote MailEnable server not exchange. 我已将smtp配置为将电子邮件发送到交换的远程MailEnable服务器。 Any ideas? 有任何想法吗?

Not really a direct answer, but you know that by default SMTP logging is not on and you need to enable it via IIS manager. 这并不是一个直接的答案,但是您知道默认情况下SMTP日志记录未打开,因此您需要通过IIS管理器启用它。 So, you won't get any logs until you do so. 因此,除非您这样做,否则您将不会获得任何日志。 You will be able to tell if logging is enabled, as SMTP startup/initialization will generate log entries, regardless to any other activities. 您将能够知道是否启用了日志记录,因为SMTP启动/初始化将生成日志条目,而与其他任何活动无关。 If your log file is blank, SMTP is not running. 如果您的日志文件为空,则SMTP未运行。

That test only applies to 2000, at least that what the papers says. 该测试仅适用于2000年,至少是论文所说的那样。 You should try here 你应该在这里尝试

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

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