From 2d96009ddff1dbe53a264da57ea5dae242afada6 Mon Sep 17 00:00:00 2001 From: wispx <1591788658@qq.com> Date: Mon, 3 Dec 2018 15:43:35 +0800 Subject: [PATCH] test mail --- application/index/controller/Base.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/application/index/controller/Base.php b/application/index/controller/Base.php index d91fbfdb..d71e1ebe 100644 --- a/application/index/controller/Base.php +++ b/application/index/controller/Base.php @@ -127,7 +127,9 @@ class Base extends Controller $mail->isHTML(true); $mail->Subject = $subject; $mail->Body = $body; - $mail->send(); + if (!$mail->send()) { + throw new Exception('Mailer Error: ' . $mail->ErrorInfo); + } } catch (Exception $e) { return $this->error($e->getMessage()); }