diff --git a/config.yml.sample b/config.yml.sample index 293939cca..e47aa248b 100644 --- a/config.yml.sample +++ b/config.yml.sample @@ -106,6 +106,8 @@ mailer: queuelength: 100 # The timeout in seconds after which the current open connection to the mailserver will be closed. queuetimeout: 30 + # By default, vikunja will try to connect with starttls, use this option to force it to use ssl. + forcessl: false log: # A folder where all the logfiles should go. diff --git a/docs/content/doc/setup/config.md b/docs/content/doc/setup/config.md index 8132798f0..285c47b24 100644 --- a/docs/content/doc/setup/config.md +++ b/docs/content/doc/setup/config.md @@ -149,6 +149,8 @@ mailer: queuelength: 100 # The timeout in seconds after which the current open connection to the mailserver will be closed. queuetimeout: 30 + # By default, vikunja will try to connect with starttls, use this option to force it to use ssl. + forcessl: false log: # A folder where all the logfiles should go. diff --git a/pkg/config/config.go b/pkg/config/config.go index c2e89088c..b7d84eade 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -76,6 +76,7 @@ const ( MailerFromEmail Key = `mailer.fromemail` MailerQueuelength Key = `mailer.queuelength` MailerQueueTimeout Key = `mailer.queuetimeout` + MailerForceSSL Key = `mailer.forcessl` RedisEnabled Key = `redis.enabled` RedisHost Key = `redis.host` @@ -237,6 +238,7 @@ func InitDefaultConfig() { MailerFromEmail.setDefault("mail@vikunja") MailerQueuelength.setDefault(100) MailerQueueTimeout.setDefault(30) + MailerForceSSL.setDefault(false) // Redis RedisEnabled.setDefault(false) RedisHost.setDefault("localhost:6379") diff --git a/pkg/mail/mail.go b/pkg/mail/mail.go index 5caa90273..3cef9ba5d 100644 --- a/pkg/mail/mail.go +++ b/pkg/mail/mail.go @@ -34,6 +34,7 @@ func getDialer() *gomail.Dialer { InsecureSkipVerify: config.MailerSkipTLSVerify.GetBool(), ServerName: config.MailerHost.GetString(), } + d.SSL = config.MailerForceSSL.GetBool() return d }