go-gomail / gomail

The best way to send emails in Go.
MIT License
4.3k stars 570 forks source link

Export NetDialTimeout to public #100

Open Elbandi opened 6 years ago

Elbandi commented 6 years ago

Export the netdial function, this allow setup a custom dialer (like tor socks proxy):

dialer, _ := proxy.FromURL("socks5://127.0.0.1:9050", proxy.Direct) 
gomail.NetDialTimeout = func(network, address string, timeout time.Duration) (net.Conn, error) {
  return dialer.Dial(network, address)
}
pedromorgan commented 6 years ago

This is merged in the WIP fork https://github.com/go-mail/gomail/commits/master