How To Properly Catch An SMTPException & IOException
Hi, everyone. I have a project that sends emails to clients and also saves a copy of the email but somewhere during the operation of sending these emails, I get an IOException & sometimes an SMTPException for a particular email & it breaks the server & gives me a "Error 500"
I want to properly handle an exception when happens, like retry sending that email again or just move on to the next or maybe log it (If logging that error is the way, I want a way for the problem to appear on Event Viewer). How would I achieve that. Here is the code link