修复:增强 SMTP 连通性测试容错,加入 10 秒超时限制避免端口不通导致页面死锁,并捕获 Throwable 防止致命异常
This commit is contained in:
@@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user