Centos

無法發送 php 郵件()

  • December 20, 2013

我剛剛遷移到新伺服器,顯然我無法發送郵件。我在那里安裝了“ipb board”,每次發送郵件時,我都會在 error_log 中得到以下資訊 sh: -t: command not found

ls -l /usr/sbin/sendmail
lrwxrwxrwx 1 root root 21 Dec 19 22:57 /usr/sbin/sendmail -> /etc/alternatives/mta

rpm -qa | grep send
sendmail-milter-8.14.4-8.el6.x86_64
sendmail-8.14.4-8.el6.x86_64
sendmail-cf-8.14.4-8.el6.noarch

為了解決這個問題,我添加sendmail_path = /usr/sbin/sendmail -t -i到 php.ini

引用自:https://serverfault.com/questions/562668