fix(setup): 安装摘要和 setup 结尾卡片显示告警发往哪里,没有邮件中继时大声提示

This commit is contained in:
Lemon-miaow committed 2026-09-27 08:53:27 +08:00
1 parent 82ffa55a8f
commit c146ce84e2
8 files changed
+378 -6

No files matched your search

+5 -2
View File
@@ -279,8 +279,11 @@ func validateSMTPFrom(s string) error {
// pre-fills the non-secret fields. The password (the felis-smtp Secret and its
// host copy) is deliberately never read back — it must be re-entered to change.
// Any read error falls back to a blank form rather than blocking reconfig.
func currentSMTPInputs() smtpInputs {
cfg, err := config.Load(hostSetupConfigPath)
func currentSMTPInputs() smtpInputs { return smtpInputsFrom(hostSetupConfigPath) }
// smtpInputsFrom is currentSMTPInputs for the config at path.
func smtpInputsFrom(path string) smtpInputs {
cfg, err := config.Load(path)
if err != nil || cfg.SMTP.Host == "" {
return smtpInputs{}
}