summaryrefslogtreecommitdiffstats
path: root/model
diff options
context:
space:
mode:
Diffstat (limited to 'model')
-rw-r--r--model/config.go14
1 files changed, 14 insertions, 0 deletions
diff --git a/model/config.go b/model/config.go
index a1af59185..02af64477 100644
--- a/model/config.go
+++ b/model/config.go
@@ -262,6 +262,7 @@ type EmailSettings struct {
FeedbackName string
FeedbackEmail string
FeedbackOrganization *string
+ EnableSMTPAuth *bool
SMTPUsername string
SMTPPassword string
SMTPServer string
@@ -785,6 +786,19 @@ func (o *Config) SetDefaults() {
*o.EmailSettings.EmailBatchingInterval = EMAIL_BATCHING_INTERVAL
}
+ if o.EmailSettings.EnableSMTPAuth == nil {
+ o.EmailSettings.EnableSMTPAuth = new(bool)
+ if o.EmailSettings.ConnectionSecurity == CONN_SECURITY_NONE {
+ *o.EmailSettings.EnableSMTPAuth = false
+ } else {
+ *o.EmailSettings.EnableSMTPAuth = true
+ }
+ }
+
+ if o.EmailSettings.ConnectionSecurity == CONN_SECURITY_PLAIN {
+ o.EmailSettings.ConnectionSecurity = CONN_SECURITY_NONE
+ }
+
if o.EmailSettings.SkipServerCertificateVerification == nil {
o.EmailSettings.SkipServerCertificateVerification = new(bool)
*o.EmailSettings.SkipServerCertificateVerification = false