aboutsummaryrefslogtreecommitdiffstats
path: root/modules/setting
diff options
context:
space:
mode:
authorDmitry Azhichakov <dmitry@dsa.pp.ru>2015-02-13 10:33:55 +0300
committerDmitry Azhichakov <dmitry@dsa.pp.ru>2015-02-13 10:33:55 +0300
commit3aaf292ba8c222003048e695bf9b9ec43191ff01 (patch)
treef2453bcaf4dd8f037288542cc747d11c8cc17d94 /modules/setting
parent8a6c86644e6d73421e325c937916cefe7495bc38 (diff)
downloadgitea-3aaf292ba8c222003048e695bf9b9ec43191ff01.tar.gz
gitea-3aaf292ba8c222003048e695bf9b9ec43191ff01.zip
Fix "forcing" client certificate for SMTP
Diffstat (limited to 'modules/setting')
-rw-r--r--modules/setting/setting.go16
1 files changed, 9 insertions, 7 deletions
diff --git a/modules/setting/setting.go b/modules/setting/setting.go
index cf19b1aa8b..32284b4236 100644
--- a/modules/setting/setting.go
+++ b/modules/setting/setting.go
@@ -451,6 +451,7 @@ type Mailer struct {
From string
User, Passwd string
SkipVerify bool
+ UseCertificate bool
CertFile, KeyFile string
}
@@ -479,13 +480,14 @@ func newMailService() {
}
MailService = &Mailer{
- Name: sec.Key("NAME").MustString(AppName),
- Host: sec.Key("HOST").String(),
- User: sec.Key("USER").String(),
- Passwd: sec.Key("PASSWD").String(),
- SkipVerify: sec.Key("SKIP_VERIFY").MustBool(),
- CertFile: sec.Key("CERT_FILE").String(),
- KeyFile: sec.Key("KEY_FILE").String(),
+ Name: sec.Key("NAME").MustString(AppName),
+ Host: sec.Key("HOST").String(),
+ User: sec.Key("USER").String(),
+ Passwd: sec.Key("PASSWD").String(),
+ SkipVerify: sec.Key("SKIP_VERIFY").MustBool(),
+ UseCertificate: sec.Key("USE_CERTIFICATE").MustBool(),
+ CertFile: sec.Key("CERT_FILE").String(),
+ KeyFile: sec.Key("KEY_FILE").String(),
}
MailService.From = sec.Key("FROM").MustString(MailService.User)
log.Info("Mail Service Enabled")