【WordPress】CentOS 6.10 测试WP发送邮件失败
1、错误信息如下:
SMTP -> ERROR: Failed to connect to server: Permission denied (13)
SRE实战 互联网时代守护先锋,助力企业售后服务体系运筹帷幄!一键直达领取阿里云限量特价优惠。
2、解决方法:
https://gistpages.com/posts/phpmailer_smtp_error_failed_to_connect_to_server_permission_denied_13_fix
3、查看phpmailer状态
$ getsebool httpd_can_sendmail httpd_can_sendmail --> off $ getsebool httpd_can_network_connect httpd_can_network_connect --> off
4、以上可以看出,需要打开连接
$ setsebool -P httpd_can_sendmail 1 $ setsebool -P httpd_can_network_connect 1

更多精彩