PHPMailer发送邮件,出现无法连接host (Could not connect to SMTP host)
程序员文章站
2022-09-02 22:57:42
php PHPMailer发送邮件,出现无法连接host,这是因为fsockopen函数被禁用,PHPmailer发送Email依赖此函...
php PHPMailer发送邮件,出现无法连接host,这是因为fsockopen函数被禁用,PHPmailer发送Email依赖此函数。
修改:
class.stmp.php
解决:
1:
118行:
$this->smtp_conn = fsockopen($host, // the host of the server
改为:
$this->smtp_conn = pfsockopen($host, // the host of the server
2:
文件:class.phpmailer.php
291行:
public function IsSMTP() {
$this->Mailer = 'smtp';
}
改为:
public function IsSMTP() {
$this->Mailer = 'SMTP';
}
推荐阅读
-
PHPMailer发送邮件,出现无法连接host (Could not connect to SMTP host)
-
发送邮件SMTP Error Could not connect to SMTP host. send fail的解决办法_PHP教程
-
发送邮件SMTP Error Could not connect to SMTP host. send fail的解决办法_PHP教程
-
PHPMailer发送邮件,出现无法连接host (Could not connect to SMTP host)
-
发送邮件SMTP Error Could not connect to SMTP host. send fail的解决办法
-
phpmailer发送邮件报SMTP Error: Could not connect to SMTP host的解决办法
-
PHPMailer发送邮件,出现无法连接host (Could not connect to SMTP host)_PHP教程
-
PHPMailer发送邮件,出现无法连接host (Could not connect to SMTP host)
-
phpmailer发送邮件报SMTP Error: Could not connect to SMTP host的解决办法