Skip to content

Commit d64cce9

Browse files
committed
keep compatibility
1 parent 47722bf commit d64cce9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/mailer/mailer.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ func (s *smtpSender) Send(from string, to []string, msg io.WriterTo) error {
122122
}
123123
defer conn.Close()
124124

125-
isSecureConn := opts.IsTLSEnabled
125+
isSecureConn := opts.IsTLSEnabled || (strings.HasSuffix(port, "465"))
126126
// Start TLS directly if the port ends with 465 (SMTPS protocol)
127127
if isSecureConn {
128128
conn = tls.Client(conn, tlsconfig)

0 commit comments

Comments
 (0)