I had a situation where when I attempt to send an e-mail when the user clicks on a button, the e-mail fails. I dont have the exact error message because it happens randomly, but basically it says that the Connection refused the send action. It gave a messy code page. How do I prevent it from displaying the messy code page when this happens? Basically if this happens again, I want it to stop and give an error message on a label control. The code below is set up using a transaction operation.
My main problem is finding a way if there is a error when sending using this piece of code below:
smtpClient.Send(m)
What can I do to error gracefully.
Thanks in advance,
Chuck
Protected Sub Wizard2_FinishButtonClick(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.WizardNavigationEventArgs) Handles Wizard2.FinishButtonClick
Dim Panel1 As Panel = DirectCast(Wiz ...
Go to the complete details ...