J
jason
I discovered this morning that a few of my sites have routines to
automatically email when pages are accessed. These pages were down
becuase the the smtp server I'm using was down. I would see a delay to
load the page for about 10 seconds followed by the :
The transport failed to connect error.
using the following code to email:
SmtpMail.Send(mail)
I added a try/catch, but now I still see the 10 second delay and
finally the page loads.
Try
SmtpMail.Send(mail)
Catch Exc As Exception
Finally
End Try
Question, Any way I can code the try/catch to give up much quicker on
the attempt to email.
automatically email when pages are accessed. These pages were down
becuase the the smtp server I'm using was down. I would see a delay to
load the page for about 10 seconds followed by the :
The transport failed to connect error.
using the following code to email:
SmtpMail.Send(mail)
I added a try/catch, but now I still see the 10 second delay and
finally the page loads.
Try
SmtpMail.Send(mail)
Catch Exc As Exception
Finally
End Try
Question, Any way I can code the try/catch to give up much quicker on
the attempt to email.