当没有指定标题时,Sendmail不能从本地PHP工作
我无法让我的本地XAMPP服务器通过我的远程SMTP服务器发送电子邮件。 在PHP中,如果我把: $headers = "From: [email protected]\r\n"; mail('[email protected]', 'test', '', $headers); 然后这工作。 但是,如果我不指定标题,即: mail('[email protected]', 'test', ''); 然后这失败了。 sendmail.log文件说: smtpstatus=554 smtpmsg='554 Message refused.' errormsg='the server did not accept the mail' exitcode=EX_UNAVAILABLE 我试着在我的php.ini中更改我的sendmail命令: sendmail_path = "C:/xampp/sendmail/sendmail.exe -t -f [email protected]" 但是这也行不通。 感谢任何帮助,丹。 PS。 这是在窗户上。