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

@@ -114,7 +114,7 @@ Command-line flags should be specified in the Subsystem declaration.
os.Exit(1)
}
smtpConfig := config.GetSMTPConfig()
err = smtpConfig.Initialize(configDir)
err = smtpConfig.Initialize(configDir, false)
if err != nil {
logger.Error(logSender, connectionID, "unable to initialize SMTP configuration: %v", err)
os.Exit(1)