是否可以指示 PHP 在 php.ini 中使用后缀配置?
Is it possible to instruct PHP to use postfix configuration in php.ini?
是否可以配置 PHP 以使用后缀的配置集发送电子邮件?
WordPress(通过 PHPMailer)依赖这些设置在 php.ini 中是正确的:
;SMTP = localhost
; http://php.net/smtp-port
;smtp_port = 25
; For Win32 only.
; http://php.net/sendmail-from
;sendmail_from = me@example.com
; For Unix only. You may supply arguments as well (default: "sendmail -t -i").
; http://php.net/sendmail-path
sendmail_path = "/usr/sbin/sendmail -t -i"
; Force the addition of the specified parameters to be passed as extra parameters
; to the sendmail binary. These parameters will always replace the value of
; the 5th parameter to mail().
;mail.force_extra_parameters =
; Add X-PHP-Originating-Script: that will include uid of the script followed by the filename
mail.add_x_header = On
; The path to a log file that will log all mail() calls. Log entries include
; the full path of the script, line number, To address and headers.
mail.log = /var/log/mail.log
; Log mail to syslog (Event Log on Windows).
;mail.log = syslog
Postfix 配置为使用 Google 的 SMTP 服务器并确认工作在 OS (Ubuntu 14.04) 级别
PHPMailer 失败(来自 WordPress)并出现错误:
Could not instantiate mail function.
结果是因为我使用的是 php-fpm,所以我不知道的设置存在于 /etc/php5/mods-available/zzzz_custom.ini 中。
将 sendmail 路径添加到该文件对我有用:
sendmail_path=/usr/sbin/sendmail -t -i
是否可以配置 PHP 以使用后缀的配置集发送电子邮件?
WordPress(通过 PHPMailer)依赖这些设置在 php.ini 中是正确的:
;SMTP = localhost
; http://php.net/smtp-port
;smtp_port = 25
; For Win32 only.
; http://php.net/sendmail-from
;sendmail_from = me@example.com
; For Unix only. You may supply arguments as well (default: "sendmail -t -i").
; http://php.net/sendmail-path
sendmail_path = "/usr/sbin/sendmail -t -i"
; Force the addition of the specified parameters to be passed as extra parameters
; to the sendmail binary. These parameters will always replace the value of
; the 5th parameter to mail().
;mail.force_extra_parameters =
; Add X-PHP-Originating-Script: that will include uid of the script followed by the filename
mail.add_x_header = On
; The path to a log file that will log all mail() calls. Log entries include
; the full path of the script, line number, To address and headers.
mail.log = /var/log/mail.log
; Log mail to syslog (Event Log on Windows).
;mail.log = syslog
Postfix 配置为使用 Google 的 SMTP 服务器并确认工作在 OS (Ubuntu 14.04) 级别
PHPMailer 失败(来自 WordPress)并出现错误:
Could not instantiate mail function.
结果是因为我使用的是 php-fpm,所以我不知道的设置存在于 /etc/php5/mods-available/zzzz_custom.ini 中。
将 sendmail 路径添加到该文件对我有用:
sendmail_path=/usr/sbin/sendmail -t -i