Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
README: clarify that direct TLS for SMTP is not supported, STARTTLS i…
…s. (stashapp#650) The current implementation of the stash-box email package uses the smtp.SendMail function which is part of the go standard library. But this function only supports plain tcp connections and upgrades them through STARTTLS. net/smtp has no function that can establish a TLS/TCP connection (aka SMTPS). When stash-box is configured to use a TLS port for email, it initiates a plain tcp connection waiting for the SMTP server to start an SMTP handshake. But the SMTP(S) server is expecting a TLS handshake so stash-box hangs indefinitely until the TCP connection times out at which point it returns "EOF". This is confusing and time-consuming for administrators to investigate. Hopefully, this README clarification can help avoid this confusion in the future. Ultimately, if someone wants to put in the effort to properly implement SMTPS support, it can be done with a higher-level package such as emersion/go-smtp. https://pkg.go.dev/github.com/emersion/go-smtp#DialTLS
- Loading branch information