- 工信部備案號 滇ICP備05000110號-1
- 滇公安備案 滇53010302000111
- 增值電信業(yè)務(wù)經(jīng)營(yíng)許可證 B1.B2-20181647、滇B1.B2-20190004
- 云南互聯(lián)網(wǎng)協(xié)會(huì )理事單位
- 安全聯(lián)盟認證網(wǎng)站身份V標記
- 域名注冊服務(wù)機構許可:滇D3-20230001
- 代理域名注冊服務(wù)機構:新網(wǎng)數碼
使用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ā)送郵件了。
售前咨詢(xún)
售后咨詢(xún)
備案咨詢(xún)
二維碼
TOP