Skip to content

Commit

Permalink
fix: tell tls what the smtps server name is (#634)
Browse files Browse the repository at this point in the history
  • Loading branch information
alsuren committed Aug 6, 2020
1 parent 3309c2c commit b724038
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion courier/courier.go
Expand Up @@ -49,7 +49,7 @@ func NewSMTP(d smtpDependencies, c configuration.Provider) *Courier {
ssl = true
sslSkipVerify, _ := strconv.ParseBool(uri.Query().Get("skip_ssl_verify"))
// #nosec G402 This is ok (and required!) because it is configurable and disabled by default.
tlsConfig = &tls.Config{InsecureSkipVerify: sslSkipVerify}
tlsConfig = &tls.Config{InsecureSkipVerify: sslSkipVerify, ServerName: uri.Hostname()}
}

return &Courier{
Expand Down

0 comments on commit b724038

Please sign in to comment.