You should break that 40s up and see how long is spent on dial, and how
long is spent on send.
On Thu, Aug 24, 2017 at 9:41 PM, wrote:
> Thank you very much for your reply. However, in my code, it spent 40s to
> send email.
>
> Here is the code:
>
> now := time.Now()
> msg := gomail.NewMessage()
On Sun, Aug 27, 2017 at 10:31 PM, 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