go-smtp
go-smtp copied to clipboard
client: add InitConn method
InitConn() method allows to set the client's connection after the smtp.Client variable initialization with custom timeouts.
resolves #175
This doesn't sound like a great API. Instead, what about adding a ClientOptions arg to NewClient?
I didn't want to break the backward compatibility and make it as much transparent as possible. I'm fine to introduce ClientOptions with a new function like NewClientWithOptions or NewClientOpts.
Works for me.
Alternative approach in https://github.com/emersion/go-smtp/pull/184
Superseded by https://github.com/emersion/go-smtp/pull/184