smtp: require templates only if a server is configured or in service mode

This regression was introduced after recent changes to allow setting the SMTP
settings from the WebAdmin UI.

Fixes #1217

Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
Nicola Murino
2023-03-01 18:31:02 +01:00
parent fad6af11e5
commit 662164c7ff
9 changed files with 104 additions and 82 deletions

View File

@@ -50,7 +50,7 @@ If the SMTP configuration is correct you should receive this email.`,
os.Exit(1)
}
smtpConfig := config.GetSMTPConfig()
err = smtpConfig.Initialize(configDir)
err = smtpConfig.Initialize(configDir, false)
if err != nil {
logger.ErrorToConsole("unable to initialize SMTP configuration: %v", err)
os.Exit(1)