Thanks very much. But, what I mean of setting timeout is giving up this sending, and try to send another email
在 2017年8月29日星期二 UTC+8上午9:59:24,Antonio Sun写道: > > > > On Sun, Aug 27, 2017 at 10:31 PM, <yhj7...@163.com <javascript:>> wrote: > >> >> Without setting timeout on sending, it spent 5 minutes to send an email. >> Badly, it will hang up, then cause bug on production. >> > > That means the mail server is busy. Setting shorter timeout will > stress mail server even more and make things worse for everyone. > > The proper way is wait, and retry (dialing), with each retry waiting twice > as long as before. So even if the remote mail server is down for a few > hours, you email can still go through eventually. > > > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.