From 9925d52d9c75c7a4e2b1220d8fa7fd055870c0e4 Mon Sep 17 00:00:00 2001 From: Christopher Speller Date: Mon, 15 Jun 2015 11:14:26 -0400 Subject: Modifying sendmail to allow for non-encrypted connection for ease setup of local mail sender --- utils/config.go | 1 + 1 file changed, 1 insertion(+) (limited to 'utils/config.go') diff --git a/utils/config.go b/utils/config.go index b6688de68..37da59315 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 -- cgit v1.2.3-1-g7c22 From 2f2aded178c161f7688f295231605711806c7f64 Mon Sep 17 00:00:00 2001 From: Christopher Speller Date: Tue, 16 Jun 2015 17:05:23 -0400 Subject: Allow for setting of domain with enviroment variable --- utils/config.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'utils/config.go') diff --git a/utils/config.go b/utils/config.go index 76e6060be..745887c70 100644 --- a/utils/config.go +++ b/utils/config.go @@ -217,6 +217,11 @@ 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") + } + configureLog(config.LogSettings) Cfg = &config -- cgit v1.2.3-1-g7c22 From 6eb3775956974c510122261346edc5fe230f3cf3 Mon Sep 17 00:00:00 2001 From: Christopher Speller Date: Wed, 17 Jun 2015 11:50:51 -0400 Subject: Adding check of email configuation settings when config file is loaded --- utils/config.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'utils/config.go') diff --git a/utils/config.go b/utils/config.go index 745887c70..418041706 100644 --- a/utils/config.go +++ b/utils/config.go @@ -222,6 +222,11 @@ func LoadConfig(fileName string) { 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 -- cgit v1.2.3-1-g7c22