国产欧美日韩第一页|日本一二三不卡视频|在线精品小视频,亚洲第一免费播放区,metcn人体亚洲一区,亚洲精品午夜视频

幫助中心 >  技術(shù)知識庫 >  網(wǎng)站相關(guān) >  網(wǎng)站運營(yíng) >  PHPMailer發(fā)送郵件出現Permission denied的解決辦法

PHPMailer發(fā)送郵件出現Permission denied的解決辦法

2017-06-06 16:54:04 11350

使用PHPMailer發(fā)送郵件, 可能會(huì )出現Permission denied錯誤, 如下:

 04:05:00 Connection: opening to smtp.exmail.qq.com:25, timeout=300, options=array ( ) 2016-06-30 04:05:04 SMTP ERROR: Failed to connect to server: Permission denied (13) 2016-06-30 04:05:04 SMTP connect() failed. http://www.tjdsmy.cn/PHPMailer/PHPMailer/wiki/Troubleshooting Message could not be sent.Mailer Error: SMTP connect() failed. http://www.tjdsmy.cn/PHPMailer/PHPMailer/wiki/Troubleshooting


這是因為selinux拒絕httpd服務(wù)發(fā)送郵件, 可以修改selinux的規則。 步驟如下:


1、使用下面的命令查看selinux的權限。


getsebool -a  | grep httpd_can_sendmail


OR


getsebool httpd_can_sendmail


2、再使用下面的命令允許httpd發(fā)送郵件。



setsebool -P httpd_can_sendmail 1
 
OR
 
/usr/sbin/setsebool-P httpd_can_sendmail on



  這樣, 就能夠正常發(fā)送郵件了。


提交成功!非常感謝您的反饋,我們會(huì )繼續努力做到更好!

這條文檔是否有幫助解決問(wèn)題?

非常抱歉未能幫助到您。為了給您提供更好的服務(wù),我們很需要您進(jìn)一步的反饋信息:

在文檔使用中是否遇到以下問(wèn)題:
-->