找到原因了:
参考:https://github.com/PHPMailer/PHPMailer/issues/914
在Mail.php
里面增加:(加粗部分)
public function Send($to,$name,$title,$content){
$mail = new PHPMailer();
$mail->isSMTP();
$mail->SMTPAuth=true;
$mail->Host = $this->smtpHost;
if(!empty($this->encriptionType) && $this->encriptionType != "no"){
$mail->SMTPSecure = $this->encriptionType;
$mail->SMTPOptions = array(
'ssl' => array(
'verify_peer' => false,
'verify_peer_name' => false,
'allow_self_signed' => true
)
);
}
$mail->Port = $this->smtpPort;
$mail->CharSet = 'UTF-8';
$mail->FromName = $this->fromName;