From 8a6c86644e6d73421e325c937916cefe7495bc38 Mon Sep 17 00:00:00 2001 From: Dmitry Azhichakov Date: Thu, 12 Feb 2015 18:54:51 +0300 Subject: New feature: SMTP connection may use client certificate. New config keys in [mailer] section: - CERT_FILE: path to a certificate file. - KEY_FILE: path to a key file. --- modules/setting/setting.go | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'modules/setting/setting.go') diff --git a/modules/setting/setting.go b/modules/setting/setting.go index d71a8cda..cf19b1aa 100644 --- a/modules/setting/setting.go +++ b/modules/setting/setting.go @@ -446,11 +446,12 @@ func newSessionService() { // Mailer represents mail service. type Mailer struct { - Name string - Host string - From string - User, Passwd string - SkipVerify bool + Name string + Host string + From string + User, Passwd string + SkipVerify bool + CertFile, KeyFile string } type OauthInfo struct { @@ -483,6 +484,8 @@ func newMailService() { 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(), } MailService.From = sec.Key("FROM").MustString(MailService.User) log.Info("Mail Service Enabled") -- cgit v1.2.3