dongliu6848 2012-01-25 18:44
浏览 61
已采纳

即使Postfix停止,PHP Mail / Postfix也始终返回true

I have a weird problem. Using the mail() function and a local Postfix on the server. When Postfix is running, mail gets sent just fine but if I stop Postfix mail() still returns true but no e-mails are obviously sent and no error gets logged anywhere.

Code for sending:

echo $accepted; //Returns 0
$accepted = mail($to, $subject, $message, $headers);
echo $accepted; //Returns 1

No other MTAs are running at the server.

Is there any good way of debugging this?

  • 写回答

1条回答 默认 最新

  • dongxuan58311366668 2012-01-25 18:49
    关注

    While Postfix may not be running, the mail is still successfully enqueued for sending - on the next start of Postfix it will be processed and sent.

    PHP's (internal) sendmail call has no way to know, if the MTA is running - just if queueing the mail worked or not.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥30 线性代数的问题,我真的忘了线代的知识了
  • ¥15 有谁能够把华为matebook e 高通骁龙850刷成安卓系统,或者安装安卓系统
  • ¥188 需要修改一个工具,懂得汇编的人来。
  • ¥15 livecharts wpf piechart 属性
  • ¥20 数学建模,尽量用matlab回答,论文格式
  • ¥15 昨天挂载了一下u盘,然后拔了
  • ¥30 win from 窗口最大最小化,控件放大缩小,闪烁问题
  • ¥20 易康econgnition精度验证
  • ¥15 msix packaging tool打包问题
  • ¥28 微信小程序开发页面布局没问题,真机调试的时候页面布局就乱了