Closed knadh closed 4 years ago
I ended up releasing the fork at knadh/smtppool. It's a new pool lib with the e-mail parsing/preparation forked from this lib. Handles idle timeouts, re-connections, and message retries on failures, gracefully.
Thanks for this lib @jordan-wright!
Hi @jordan-wright, Been using
email
in a bunch of places, and it works well, except for a couple (serious) problems. It does not always handle connection failures gracefully, and it has no mechanism to timeout idle connections. This is a critical issue with providers like SES that kill long standing connections, while the pool remains oblivious, failing new messages as they come. This behaviour also leads to providers throttling further connections.I've a fork under development with minor cosmetic changes to
email.go
, with a whole new pooling mechanism (completely newpool.go
). The pool is maintained in a channel like it is right now, and there is a goroutine that periodically sweeps idle connections and closes them.There is no change to the
Send()
API, butNew()
takes an options struct instead of a list of arguments, breaking compatibility with the existing versions.Would you be open to reviewing and merging this as a major breaking version,
v4
?