Linux vps無法發送郵件
首先安裝sendmail軟件...
yum install sendmail
/etc/init.d/php-fpm restart
來檢查下sendmail是否正常運行
/etc/init.d/sendmail status
如果顯示正常運行說明已經安裝成功了
設置sendmail的絕對路徑
/usr/local/php/etc/php.ini 找到了sendmail_path把他修改成 sendmail_path = /usr/sbin/sendmail -t –i;
重啟php-fpm進程
/etc/init.d/php-fpm restart
然後啟動sendmail服務
/etc/init.d/sendmail start
設置sendmail功能開機啟動
#chkconfig sendmail on