| ... | ... | @@ -162,12 +162,12 @@ class MailFun { | 
|  |  | * @author:dc | 
|  |  | * @time 2023/4/11 9:12 | 
|  |  | */ | 
|  |  | public static function sendEmail(array $data, array $email){ | 
|  |  | public static function sendEmail(array $data, array $email,$debug = false){ | 
|  |  | $smtp = self::getHostPort($email['smtp'],465); | 
|  |  | // 邮件对象 | 
|  |  | $mail = new PHPMailer(); | 
|  |  | //Server settings | 
|  |  | $mail->SMTPDebug = SMTP::DEBUG_OFF;//调试输出  SMTP::DEBUG_SERVER;                    //Enable verbose debug output | 
|  |  | $mail->SMTPDebug = $debug ? SMTP::DEBUG_SERVER : SMTP::DEBUG_OFF;//调试输出  SMTP::DEBUG_SERVER;                    //Enable verbose debug output | 
|  |  | $mail->isSMTP();                                            //Send using SMTP | 
|  |  | $mail->Host       = $smtp['host'];                     //Set the SMTP server to send through | 
|  |  | $mail->SMTPAuth   = true;                                   //Enable SMTP authentication | 
... | ... |  |