当前位置: 首页 电商生活

SMTP Error: Could not connect to SMTP host的解决办法

栏目:电商生活 作者:重庆幺哥电脑 时间:2014-06-01 11:57:45

SMTP Error: Could not connect to SMTP host.的解决办法

博客邮件 Could not connect to SMTP host问题原因:PHPmailer里有一个判断的函数。

public function IsSMTP() {
$this->Mailer = 'SMTP';
}
switch($this->Mailer)
{case 'sendmail':
return $this->SendmailSend($header, $body);
case 'smtp'://由于SMTP和smtp不相等 所以选择的是下面MailSend发送邮件 并不是使用smtp发送邮件
return $this->SmtpSend($header, $body);
default:
return $this->MailSend($header, $body);

解决方法:

在 class.phpmailer.php 中,将

function IsSMTP() {
$this->Mailer = 'smtp';
}

改成:

function IsSMTP() {
$this->Mailer = 'SMTP';
}



阅读:6773次
我要留言

网友留言

独行者

谢谢分享,果断解决博客不能发送邮件的问题。

2014-06-01 12:14:52 回复

沈军

@独行者:我也是刚刚遇到SMTP Error: Could not connect to SMTP host这个问题,总结分享给大家。

2014-06-01 12:17:44 回复

百家网络博客

邮件问题一直是个大问题,刚搬完家邮件函数被禁,正想办法修复、。。。

2014-06-02 23:44:41 回复

我要留言

  

微信扫一扫 预约上门维修

分类栏目