mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-07 14:50:55 +03:00
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:
@@ -148,7 +148,7 @@ func (s *Service) initializeServices(disableAWSInstallationCode bool) error {
|
||||
return err
|
||||
}
|
||||
smtpConfig := config.GetSMTPConfig()
|
||||
err = smtpConfig.Initialize(s.ConfigDir)
|
||||
err = smtpConfig.Initialize(s.ConfigDir, s.PortableMode != 1)
|
||||
if err != nil {
|
||||
logger.Error(logSender, "", "unable to initialize SMTP configuration: %v", err)
|
||||
logger.ErrorToConsole("unable to initialize SMTP configuration: %v", err)
|
||||
|
||||
Reference in New Issue
Block a user