test mail

This commit is contained in:
wispx
2018-12-03 15:43:35 +08:00
parent 3611c7f5e2
commit 2d96009ddf
+3 -1
View File
@@ -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());
}