如何在 PHP 中设置 mail.log?

如何在 PHP 中设置 mail.log?

我正在尝试在 PHP 中设置 mail.log。我更新了服务器上的 php.ini 的 mail.log 设置:

; Log all mail() calls including the full path of the script, line #, to address and headers
mail.log = "/var/log/myphpmaillog"

创建了 myphpmaillog:

touch myphpmaillog

并重新启动 apache 守护进程:

service httpd restart

我通过服务器发送了几封电子邮件并检查了 myphpmaillog,它仍然是空的。它似乎具有正确的权限。我使用的是 PHP 5.3 和 CentOS 5.11。

相关内容