mirror of
https://github.com/wneessen/go-mail.git
synced 2024-12-22 18:50:37 +01:00
fix: tls config unused with dialer
This ensures the configured tls.Config is used with the tls.Dialer.
This commit is contained in:
parent
6a7d49f1b6
commit
b8646489ae
1 changed files with 3 additions and 1 deletions
|
@ -431,9 +431,11 @@ func (c *Client) DialWithContext(pc context.Context) error {
|
|||
defer cfn()
|
||||
|
||||
nd := net.Dialer{}
|
||||
td := tls.Dialer{}
|
||||
|
||||
var err error
|
||||
if c.ssl {
|
||||
td := tls.Dialer{NetDialer: &nd, Config: c.tlsconfig}
|
||||
|
||||
c.enc = true
|
||||
c.co, err = td.DialContext(ctx, "tcp", c.ServerAddr())
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue