修复:增强 SMTP 连通性测试容错,加入 10 秒超时限制避免端口不通导致页面死锁,并捕获 Throwable 防止致命异常

This commit is contained in:
2026-02-27 09:53:46 +08:00
parent baae2cc26f
commit 02356666ca
2 changed files with 2 additions and 2 deletions
@@ -77,7 +77,7 @@ class SmtpController extends Controller
});
return redirect()->route('admin.smtp.edit')->with('success', "测试邮件已成功发送至 {$testEmail},请注意查收。");
} catch (\Exception $e) {
} catch (\Throwable $e) {
return redirect()->route('admin.smtp.edit')->with('error', "测试发出失败,原因:" . $e->getMessage());
}
}