mirror of
https://github.com/wneessen/go-mail.git
synced 2024-11-21 21:30:50 +01:00
Remove redundant connection check in tls function
The `tls` function in `client.go` no longer checks for an active connection before executing. This simplifies the code since the connection check is either redundant or already handled elsewhere in the flow.
This commit is contained in:
parent
28dc629674
commit
e442419c18
1 changed files with 0 additions and 3 deletions
|
@ -1360,9 +1360,6 @@ func (c *Client) setDefaultHelo() error {
|
|||
// - An error if there is no active connection, if STARTTLS is required but not supported,
|
||||
// or if there are issues during the TLS handshake; otherwise, returns nil.
|
||||
func (c *Client) tls() error {
|
||||
if !c.smtpClient.HasConnection() {
|
||||
return ErrNoActiveConnection
|
||||
}
|
||||
if !c.useSSL && c.tlspolicy != NoTLS {
|
||||
hasStartTLS := false
|
||||
extension, _ := c.smtpClient.Extension("STARTTLS")
|
||||
|
|
Loading…
Reference in a new issue