PHPMailer6.2 MAIL FROM command failed异常的一个原因
做一个邮件发送时我使用了像这样的形式 class a{ private $PHPMailer; public function __construct() { $this->PHPMailer=new \PHPMailer\PHPMailer\PHPMailer(); } private function getSender(){ return '返回一个可用的发送者'; } private function sendMail($Address, $Title, $Content) { $Sender = $this->getSender(); $this->PHPMailer=new PHPMailer\PHPMailer\PHPMailer(true); $this->PHPMailer->Host = $Sender['Host']; $this->PHPMailer->Username = $Sender['Address']; $this->PHPMailer->Password = $Sender['AuthCode']; $this->PHPMailer->SMTPAuth = true; $this->PHPMailer->CharSet = 'utf-8'; $this->PHPMailer->Subject = $Title; $this->PHPMailer-