mail()函数发信报错
分类:linux日期:2015-07-01 - 22:10:23评论:6条作者:老谢
mail()函数发信报错:Could not instantiate mail function.,原因是服务器没有安装sendmail组件,使用yum进行安装:
yum install sendmail /etc/init.d/sendmail start |
注意:如果sendmail启动缓慢,请将hostname加入到/etc/hosts里面
配置/usr/local/php/etc/php.ini,填写sendmail绝对路径:
vim /usr/local/php/etc/php.ini sendmail_path = /usr/sbin/sendmail -t -i :wq! /etc/init.d/php-fpm restart |
注意:如果邮件显示为xxx代发,请将你的域名加入到/etc/hosts即可

最新评论
秦大叔:现在都是够用就好,不想太折腾了。
Andy烧麦:X1C 5th 2017年-2022年,走南闯北...
王叨叨:自从换了typecho,博客也不怎么出问...
王叨叨:我准备给我的老笔记本搞一个linux系...
大D:台式机现在只能是AMD YES!
springwood:查询了一下,ThinkPad x1c 9th ...
黑石:特斯拉和小米,选哪个?不是很懂车,就...
Huo:电车的确开着舒服,也是纠结想换电车,...
zwwooooo:类似以前做网站开发时,一开始有自...
老陳网志:有点高端,像我们整点nas玩玩就够...