diff options
author | asaadmahmoodspin <asaad@battlehouse.com> | 2015-06-19 19:52:04 +0500 |
---|---|---|
committer | asaadmahmoodspin <asaad@battlehouse.com> | 2015-06-19 19:52:04 +0500 |
commit | 20676fd740781e3b818b7411be17ec6f4f67bc3f (patch) | |
tree | 059988228781471d43fd212525cb3bd53de0e040 /utils/config.go | |
parent | 0821b51f4ee5fcc2eadc2c92c60ebbb4fdc084d3 (diff) | |
parent | 32025e43799324523988af040085d95ec6b6e80e (diff) | |
download | chat-20676fd740781e3b818b7411be17ec6f4f67bc3f.tar.gz chat-20676fd740781e3b818b7411be17ec6f4f67bc3f.tar.bz2 chat-20676fd740781e3b818b7411be17ec6f4f67bc3f.zip |
Merge pull request #1 from rgarmsen2295/mm-1253
MM-1253
Diffstat (limited to 'utils/config.go')
-rw-r--r-- | utils/config.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/utils/config.go b/utils/config.go index 1060c7550..418041706 100644 --- a/utils/config.go +++ b/utils/config.go @@ -79,6 +79,7 @@ type EmailSettings struct { SMTPUsername string SMTPPassword string SMTPServer string + UseTLS bool FeedbackEmail string FeedbackName string ApplePushServer string @@ -216,6 +217,16 @@ func LoadConfig(fileName string) { panic("Error decoding configuration " + err.Error()) } + // Grabs the domain from enviroment variable if not in configuration + if config.ServiceSettings.Domain == "" { + config.ServiceSettings.Domain = os.Getenv("MATTERMOST_DOMAIN") + } + + // Validates our mail settings + if err := CheckMailSettings(); err != nil { + l4g.Error("Email settings are not valid err=%v", err) + } + configureLog(config.LogSettings) Cfg = &config |