jordan-wright / email

Robust and flexible email library for Go
MIT License
2.61k stars 324 forks source link

Start sending after client was idle for a while: tcp write: broken pipe #123

Open phev8 opened 3 years ago

phev8 commented 3 years ago

Hi!

We observed an issue when starting to send a batch of emails using a pool, when the client was idle for a while. In this case, the first couple of emails (50-200) are failing with the error "broken pipe". After that, it starts to send the messages normally again.

write tcp <local server ip> -> <ip-of the mail-server>: write: broken pipe

The setup is using exchange mail servers (list of pools initialised as shown in the documentation).

Is there any configuration option/recommended use, we can prevent this happening, or tell the client it should renew the connection?

gregseb commented 3 years ago

I'm also seeing this.

al-ship commented 3 years ago

It effects me too.

oblq commented 1 year ago

Me too.

Kryan90 commented 1 year ago

For anyone else with this issue, I switched to this fork that has some better pooling and haven't hit this since: https://github.com/knadh/smtppool