require new email status style

This commit is contained in:
Andy Miller
2024-04-05 11:46:39 -06:00
parent 8bd2b8e4d2
commit 4d87a391ad
2 changed files with 3 additions and 1 deletions

View File

@@ -483,6 +483,8 @@ class LoginController extends AdminController
try {
$message = $email->message($subject, $body, 'text/html')->setFrom($from)->setTo($to);
$sent = $email->send($message);
//backward compatibility
$sent = $sent['status'] ?? 1;
if ($sent < 1) {
throw new \RuntimeException('Sending email failed');
}