Mail module should add an option to explicitly decide using tls or not. #2266

Closed
opened 2025-11-02 04:30:25 -06:00 by GiteaMirror · 0 comments
Owner

Originally created by @simonwu-os on GitHub (Aug 29, 2018).

Dear All,
in the module gitea/modules/mailer/mailer.go, there is a fragment to decide it using tls or not.
isSecureConn := false
// Start TLS directly if the port ends with 465 (SMTPS protocol)
if strings.HasSuffix(port, "465") {
conn = tls.Client(conn, tlsconfig)
isSecureConn = true
}
It says that the port should suffix with '465'. we have a problem it, because we use a smtp which using the port 946 for tls connect. So I suggest add an option in the mail config to support tls connect explicitly.
Thanks very much.

Originally created by @simonwu-os on GitHub (Aug 29, 2018). Dear All, in the module gitea/modules/mailer/mailer.go, there is a fragment to decide it using tls or not. isSecureConn := false // Start TLS directly if the port ends with 465 (SMTPS protocol) if strings.HasSuffix(port, "465") { conn = tls.Client(conn, tlsconfig) isSecureConn = true } It says that the port should suffix with '465'. we have a problem it, because we use a smtp which using the port 946 for tls connect. So I suggest add an option in the mail config to support tls connect explicitly. Thanks very much.
GiteaMirror added the type/enhancement label 2025-11-02 04:30:25 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#2266