当前位置:论坛首页 > Linux面板 > Linux面板教程

关于无法使用PHP自带函数发送邮件的解决方法

发表在 Linux面板2017-3-2 14:41 [复制链接] 6 11354

Centos6.x:
               检查sendmail是否启动:
  1. chkconfig --list | grep sendmail
复制代码

               若显示为空请通过以下命令设置sendmail自动启动:
                          service sendmail start
                          chkconfig --level 2345 sendmail on

Centos7.x:
               检查sendmail是否启动:
  1. systemctl list-units --type=service|grep sendmail
复制代码

               若显示为空请通过以下命令设置sendmail自动启动:
                          systemctl start sendmail.service
                          systemctl enable sendmail.service
使用道具 举报 只看该作者 回复
发表于 2017-3-2 15:28:49 | 显示全部楼层
试过了 还是没用
①网站是DZ 添加了ssl
②centos6.8 64位
③nginx1.10.2
使用道具 举报 回复 支持 反对
发表于 2017-3-3 13:01:09 | 显示全部楼层
是的,当时我的wordpress就是发不出邮件,后来才知道sendmail没启动,然而还是放弃,用系统发出的邮件大多邮箱都收不到定位垃圾邮件
使用道具 举报 回复 支持 反对
发表于 2017-4-27 23:55:21 | 显示全部楼层
好文,收藏了。
使用道具 举报 回复 支持 反对
发表于 2017-6-8 15:38:17 | 显示全部楼层
systemctl start sendmail.service
                          systemctl enable sendmail.service
使用道具 举报 回复 支持 反对
发表于 2018-5-14 15:01:23 | 显示全部楼层
# systemctl list-units --type=service|grep sendmail
# systemctl start sendmail.service
Failed to start sendmail.service: Unit not found.
# systemctl enable sendmail.service
Failed to execute operation: No such file or directory

centos 7, linode
版本 5.8.7
好像不行呢

您好,新版本不再使用sendmail,请检查其它可能,比如25端口  发表于 2018-5-17 18:02
使用道具 举报 回复 支持 反对
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

企业版年付运维跟进群

普通问题处理

论坛响应时间:72小时

问题处理方式:排队(仅解答)

工作时间:白班:9:00 - 18:00

紧急问题处理

论坛响应时间:10分钟

问题处理方式:1对1处理(优先)

工作时间:白班:9:00 - 18:00

工作时间:晚班:18:00 - 24:00

立即付费处理
快速回复 返回顶部 返回列表