mirror of
https://github.com/wneessen/go-mail.git
synced 2024-11-25 15:10:48 +01:00
Merge pull request #87 from james-d-elliott/fix-tls-config
fix: tls config unused with dialer
This commit is contained in:
commit
e7b162a295
1 changed files with 3 additions and 1 deletions
|
@ -431,9 +431,11 @@ func (c *Client) DialWithContext(pc context.Context) error {
|
||||||
defer cfn()
|
defer cfn()
|
||||||
|
|
||||||
nd := net.Dialer{}
|
nd := net.Dialer{}
|
||||||
td := tls.Dialer{}
|
|
||||||
var err error
|
var err error
|
||||||
if c.ssl {
|
if c.ssl {
|
||||||
|
td := tls.Dialer{NetDialer: &nd, Config: c.tlsconfig}
|
||||||
|
|
||||||
c.enc = true
|
c.enc = true
|
||||||
c.co, err = td.DialContext(ctx, "tcp", c.ServerAddr())
|
c.co, err = td.DialContext(ctx, "tcp", c.ServerAddr())
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue