fix(setup): 安装摘要和 setup 结尾卡片显示告警发往哪里,没有邮件中继时大声提示
This commit is contained in:
8 files changed
+378
-6
No files matched your search
@@ -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{}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user