You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Current SMTP client implementation is not optimal. It acts like HTTP/1.0: one request per connection.
I'd like to see an SMTP client, which will have an SMTP transport by an analogy to http.Client and http.Transport.
Transport should allow to perform a RoundTripper method, reuse idle connections, have a map of connections per host, efficiently reuse established AUTH sessions to send messages within the same auth session when possible, etc.
P.S. I know this is a big task, and it will require a lot of effort. But at the end it will give a similar flexibility as net/http package give. I appreciate objections, feedback, suggestions.
Connection pooling is non-trivial due to SMTP stateful nature. I believe this is something that is best implemented by library users taking into consideration what is important for their own implementation.
FWIW, here is how connection pooling for MX is implemented in maddy:
Current SMTP client implementation is not optimal. It acts like HTTP/1.0: one request per connection.
I'd like to see an SMTP client, which will have an SMTP transport by an analogy to
http.Client
andhttp.Transport
.Transport should allow to perform a
RoundTripper
method, reuse idle connections, have a map of connections per host, efficiently reuse established AUTH sessions to send messages within the same auth session when possible, etc.P.S. I know this is a big task, and it will require a lot of effort. But at the end it will give a similar flexibility as
net/http
package give. I appreciate objections, feedback, suggestions.Reference emersion/go-smtp-proxy#9
The text was updated successfully, but these errors were encountered: