summaryrefslogtreecommitdiffstats
path: root/modules/setting
diff options
context:
space:
mode:
authorLanre Adelowo <adelowomailbox@gmail.com>2018-11-26 20:21:42 +0100
committertechknowlogick <hello@techknowlogick.com>2018-11-26 14:21:41 -0500
commit3a1ed825299d4686e4c5efc5324e0a70fc7dee2b (patch)
tree248148daee9706e1fb98fb5a9e2adcdf227cd01a /modules/setting
parentce9a5173feafd0903257229f8e2ffcc01b9ebcd2 (diff)
downloadgitea-3a1ed825299d4686e4c5efc5324e0a70fc7dee2b.tar.gz
gitea-3a1ed825299d4686e4c5efc5324e0a70fc7dee2b.zip
Explicitly decide whether to use TLS in mailer's configuration (#5024)
* explicitly decide on using TLS for mail connections * explicitly decide on using TLS for mail connections * keep compatibility
Diffstat (limited to 'modules/setting')
-rw-r--r--modules/setting/setting.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/modules/setting/setting.go b/modules/setting/setting.go
index b0bcd2ead8..1c4814189a 100644
--- a/modules/setting/setting.go
+++ b/modules/setting/setting.go
@@ -1523,6 +1523,7 @@ type Mailer struct {
SkipVerify bool
UseCertificate bool
CertFile, KeyFile string
+ IsTLSEnabled bool
// Sendmail sender
UseSendmail bool
@@ -1556,6 +1557,7 @@ func newMailService() {
UseCertificate: sec.Key("USE_CERTIFICATE").MustBool(),
CertFile: sec.Key("CERT_FILE").String(),
KeyFile: sec.Key("KEY_FILE").String(),
+ IsTLSEnabled: sec.Key("IS_TLS_ENABLED").MustBool(),
UseSendmail: sec.Key("USE_SENDMAIL").MustBool(),
SendmailPath: sec.Key("SENDMAIL_PATH").MustString("sendmail"),