Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Explicitly decide whether to use TLS in mailer's configuration #5024

Merged
merged 8 commits into from
Nov 26, 2018
Prev Previous commit
Next Next commit
keep compatibility
  • Loading branch information
adelowo committed Nov 2, 2018
commit d64cce9c6272fdf9e2627f12381f690b6c8fe85c
2 changes: 1 addition & 1 deletion modules/mailer/mailer.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ func (s *smtpSender) Send(from string, to []string, msg io.WriterTo) error {
}
defer conn.Close()

isSecureConn := opts.IsTLSEnabled
isSecureConn := opts.IsTLSEnabled || (strings.HasSuffix(port, "465"))
// Start TLS directly if the port ends with 465 (SMTPS protocol)
if isSecureConn {
conn = tls.Client(conn, tlsconfig)
Expand Down