未能调用新的PHPMailer,并且没有创建PHPMailer的实例。设置$mail->SMTPDebug将创建一个stdClass实例,然后调用不存在的方法(isSMTP)失败。PHPMailer版本6.0.7实时托管服务或者$mail = NULL;这是症状修复,但并不是原因,而是导致我的页面每次加载电子邮件时都发送邮件。php
use PHPMailer\<em
当我运行我的代码时,我得到了上面的错误。我尝试使用$mail = new PHPMailer\PHPMailer\PHPMailer(true)代替$Mail = new PHPMailer(true)。我也尝试过在require 'vendor/autoload.php';语句中使用完整路径。autoloader
require 'vendor/autoload.php';