diff options
-rw-r--r-- | config/config.json | 3 | ||||
-rw-r--r-- | docker/0.6/config_docker.json | 1 | ||||
-rw-r--r-- | docker/dev/config_docker.json | 1 | ||||
-rw-r--r-- | docker/local/config_docker.json | 1 | ||||
-rw-r--r-- | utils/config.go | 1 | ||||
-rw-r--r-- | utils/mail.go | 6 | ||||
-rw-r--r-- | web/react/components/login.jsx | 2 | ||||
-rw-r--r-- | web/react/components/post_list.jsx | 2 |
8 files changed, 14 insertions, 3 deletions
diff --git a/config/config.json b/config/config.json index e7134cba5..f1f3ba22c 100644 --- a/config/config.json +++ b/config/config.json @@ -73,7 +73,8 @@ "SMTPUsername": "", "SMTPPassword": "", "SMTPServer": "", - "UseTLS": false, + "UseTLS": false, + "UseStartTLS": false, "FeedbackEmail": "", "FeedbackName": "", "ApplePushServer": "", diff --git a/docker/0.6/config_docker.json b/docker/0.6/config_docker.json index 128dc1274..157120b99 100644 --- a/docker/0.6/config_docker.json +++ b/docker/0.6/config_docker.json @@ -64,6 +64,7 @@ "SMTPPassword": "", "SMTPServer": "", "UseTLS": false, + "UseStartTLS": false, "FeedbackEmail": "", "FeedbackName": "", "ApplePushServer": "", diff --git a/docker/dev/config_docker.json b/docker/dev/config_docker.json index cd612c7fe..d336300ca 100644 --- a/docker/dev/config_docker.json +++ b/docker/dev/config_docker.json @@ -64,6 +64,7 @@ "SMTPPassword": "", "SMTPServer": "", "UseTLS": false, + "UseStartTLS": false, "FeedbackEmail": "", "FeedbackName": "", "ApplePushServer": "", diff --git a/docker/local/config_docker.json b/docker/local/config_docker.json index cd612c7fe..d336300ca 100644 --- a/docker/local/config_docker.json +++ b/docker/local/config_docker.json @@ -64,6 +64,7 @@ "SMTPPassword": "", "SMTPServer": "", "UseTLS": false, + "UseStartTLS": false, "FeedbackEmail": "", "FeedbackName": "", "ApplePushServer": "", diff --git a/utils/config.go b/utils/config.go index a3944f670..536d0d802 100644 --- a/utils/config.go +++ b/utils/config.go @@ -85,6 +85,7 @@ type EmailSettings struct { SMTPPassword string SMTPServer string UseTLS bool + UseStartTLS bool FeedbackEmail string FeedbackName string ApplePushServer string diff --git a/utils/mail.go b/utils/mail.go index d152b2669..f02e21253 100644 --- a/utils/mail.go +++ b/utils/mail.go @@ -73,6 +73,12 @@ func newSMTPClient(conn net.Conn) (*smtp.Client, *model.AppError) { if err = c.Auth(auth); err != nil { return nil, model.NewAppError("SendMail", "Failed to authenticate on SMTP server", err.Error()) } + } else if Cfg.EmailSettings.UseStartTLS { + tlsconfig := &tls.Config{ + InsecureSkipVerify: true, + ServerName: host, + } + c.StartTLS(tlsconfig) } return c, nil } diff --git a/web/react/components/login.jsx b/web/react/components/login.jsx index f9eacf094..b61ea931e 100644 --- a/web/react/components/login.jsx +++ b/web/react/components/login.jsx @@ -56,7 +56,7 @@ module.exports = React.createClass({ }, function loginFailed(err) { if (err.message === 'Login failed because email address has not been verified') { - window.location.href = '/verify_email?name=' + encodeURIComponent(name) + '&email=' + encodeURIComponent(email); + window.location.href = '/verify_email?teamname=' + encodeURIComponent(name) + '&email=' + encodeURIComponent(email); return; } state.serverError = err.message; diff --git a/web/react/components/post_list.jsx b/web/react/components/post_list.jsx index 81b65174c..5fbee99f6 100644 --- a/web/react/components/post_list.jsx +++ b/web/react/components/post_list.jsx @@ -333,7 +333,7 @@ module.exports = React.createClass({ var lastViewed = Number.MAX_VALUE; if (ChannelStore.getCurrentMember() != null) { - lastViewed = ChannelStore.getCurrentMember().lastViewed_at; + lastViewed = ChannelStore.getCurrentMember().last_viewed_at; } if (this.state.postList != null) { |