mirror of
https://github.com/wneessen/go-mail.git
synced 2024-11-21 21:30:50 +01:00
Set fallbackPort to 0 in SetTLSPortPolicy
The default fallback port should be reset to 0 when setting the TLS port policy. This ensures the fallbackPort does not retain an incorrect value when switching policies.
This commit is contained in:
parent
c5b57543c1
commit
3efd2b529f
1 changed files with 1 additions and 0 deletions
|
@ -751,6 +751,7 @@ func (c *Client) SetTLSPolicy(policy TLSPolicy) {
|
|||
func (c *Client) SetTLSPortPolicy(policy TLSPolicy) {
|
||||
if c.port == DefaultPort {
|
||||
c.port = DefaultPortTLS
|
||||
c.fallbackPort = 0
|
||||
|
||||
if policy == TLSOpportunistic {
|
||||
c.fallbackPort = DefaultPort
|
||||
|
|
Loading…
Reference in a new issue