Skip to content

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

@simonwu-os

Description

@simonwu-os

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type/enhancementAn improvement of existing functionality

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions