diff --git a/app/diagnostics.go b/app/diagnostics.go index 7a5def4861..2b35ea4611 100644 --- a/app/diagnostics.go +++ b/app/diagnostics.go @@ -718,6 +718,7 @@ func (s *Server) trackConfig() { "is_default_global_relay_smtp_username": isDefault(*cfg.MessageExportSettings.GlobalRelaySettings.SmtpUsername, ""), "is_default_global_relay_smtp_password": isDefault(*cfg.MessageExportSettings.GlobalRelaySettings.SmtpPassword, ""), "is_default_global_relay_email_address": isDefault(*cfg.MessageExportSettings.GlobalRelaySettings.EmailAddress, ""), + "global_relay_smtp_server_timeout": *cfg.EmailSettings.SMTPServerTimeout, }) s.SendDiagnostic(TRACK_CONFIG_DISPLAY, map[string]interface{}{ diff --git a/model/config.go b/model/config.go index 6bc03d5594..ff1821bc84 100644 --- a/model/config.go +++ b/model/config.go @@ -2609,10 +2609,11 @@ func (s *PluginSettings) SetDefaults(ls LogSettings) { } type GlobalRelayMessageExportSettings struct { - CustomerType *string // must be either A9 or A10, dictates SMTP server url - SmtpUsername *string - SmtpPassword *string - EmailAddress *string // the address to send messages to + CustomerType *string // must be either A9 or A10, dictates SMTP server url + SmtpUsername *string + SmtpPassword *string + EmailAddress *string // the address to send messages to + SMTPServerTimeout *int } func (s *GlobalRelayMessageExportSettings) SetDefaults() { @@ -2628,6 +2629,9 @@ func (s *GlobalRelayMessageExportSettings) SetDefaults() { if s.EmailAddress == nil { s.EmailAddress = NewString("") } + if s.SMTPServerTimeout == nil || *s.SMTPServerTimeout == 0 { + s.SMTPServerTimeout = NewInt(1800) + } } type MessageExportSettings struct {