Is there Smtpclient.Timeout with infinite value?

Asked

Viewed 74 times

4

Is there any way to put SmtpClient.Timeout with the infinite value? If so, how?

1 answer

2


By "lucky" can not. It makes no sense to do this, but if you want to do wrong can use the time int.MaxValue, will give almost a month.

If you need this you may have another problem. If one sending email take longer than 5 seconds, it is unlikely that it will occur.

This technique is inadequate. If you fail after a short period of time you must try again in another attempt, take action because fail at least logging what happened.

Another technique is sending asynchronously, so it does not lock the computer in this task and can go to the others. Any email sending should be done so. If the SmtpClient had it been done today it would have already encouraged it (in fact it was modified to accept this form).

Browser other questions tagged

You are not signed in. Login or sign up in order to post.