I was just wondering how I could handle errors from the email sending function. I ahave found that if the user fills in an email incorrectly which doesn't exist, an error is displayed and the email is not sent. I would like to stop the error appearing and instead, if an error occurs, change the objMail.To to a preset email and send their instead.
Hi i have stumbled upon this post and need the same solution.
Any chance you could help me out by posting yours?
I have objMail.send that works fine if the email address is valid and works, however if it doesnt work i would like to simply tell it to output a more user friendly page explaining that the email was probably input incorrectly. Or forward the user back to the previous page carrying a message in a string in the url that i can then print onto the page they came from explaining the error, giving them the chance to easily retry.
I know how to do the string message in the url etc in just dont know how to check success of the objMail.Send before the Asp page promptly outputs its own unfriendly error.