文章详情页
php mail无法发送邮件
浏览:98日期:2022-06-01 15:34:20
问题描述
用的小鸟云服务器,php无法用mail函数发送邮件,用代码发送邮件,总是发送失败,不知道问题在哪里
问题解答
回答1:看看有没有正确设置hostname,或者需要设置/etc/php.ini文件里sendmail的路径,设置php sendmail路径方法如下:打开/etc/php.ini(不一定是这个路径),搜索;sendmail_path = 更改为sendmail_path = /usr/sbin/sendmail -t -i(不一定是这个路径,你可以通过whereis sendmail查找)。之后重启php就OK。
回答2:你这也不贴代码,也不贴报错信息,你这是发广告还是提问题?抱歉,无能为力
相关文章:
1. dockerfile - [docker build image失败- npm install]2. Docker for Mac 创建的dnsmasq容器连不上/不工作的问题3. java如何高效读写10G以上大文件4. angular.js - angular内容过长展开收起效果5. dockerfile - 我用docker build的时候出现下边问题 麻烦帮我看一下6. 在windows下安装docker Toolbox 启动Docker Quickstart Terminal 失败!7. javascript - vue-router怎么不能实现跳转呢8. javascript - IOS微信audio标签不能通过touchend播放9. docker不显示端口映射呢?10. 关docker hub上有些镜像的tag被标记““This image has vulnerabilities””
排行榜
![dockerfile - [docker build image失败- npm install]](http://www.haobala.com/attached/image/news/202311/1028105a80.png)