Hi, I'm working on a platform where we have to send several notification emails to our users and I'm using jNet library to do that, in my approach I'm initializing the smtp connection once and after that I start to send emails to our users, the problem is that the mail server can close the connection after some innactive time, how can I detect that the smtp connetion was closed in manner to reinitialize the smtp connection?, there is any example of that?
this is an example of the code that I'm using
example of code: