在localhost(fedora 22)上的PHP中的mail()不发送电子邮件

时间:2016-04-25 08:26:15

标签: php linux email lamp libstdc++

我在使用PHP发送电子邮件时遇到问题,我安装了Lampp。

在我的linux上我有postfix,当我从终端发送时一切正常。 例如: 这有效并发送电子邮件:

/usr/sbin/sendmail -f -t myaddress@gmail.com < message_body.txt

在我的php.ini

[mail function]
; For Win32 only.
; http://php.net/smtp
SMTP=localhost
; http://php.net/smtp-port
smtp_port=25

; For Win32 only.
; http://php.net/send-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 -f -t "

这是我的邮件脚本......

$send = mail("me@gmail.com", "My subject", $msg);

    if($send)
    {
        echo "ok";
    }
    else{
        echo "Failed to send";


    }

这是我尝试发送

时/ opt / lamp / logs中的错误日志
/usr/sbin/sendmail: /opt/lampp/lib/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by /lib64/libicuuc.so.54)
/usr/sbin/sendmail: /opt/lampp/lib/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by /lib64/libicuuc.so.54)
/usr/sbin/sendmail: /opt/lampp/lib/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by /lib64/libicuuc.so.54)
/usr/sbin/sendmail: /opt/lampp/lib/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by /lib64/libicuuc.so.54)
/usr/sbin/sendmail: /opt/lampp/lib/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by /lib64/libicuuc.so.54)
/usr/sbin/sendmail: /opt/lampp/lib/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by /lib64/libicuuc.so.54)

感谢您的建议

0 个答案:

没有答案