javamail / exit code -1 if disconnected

D

decroux

Hello,

I am using the javamail api to connect to my mail server (with the imap
protocol).

I can connect correctly.

My problem is this one : if I have a network disconnection while I am
connecting to the imap server, my program exit with the code -1. How
can I avoid this and catch an exception to try to reconnect instead of
this (exit code)

Thanks a lot,
Christophe.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,586
Members
45,088
Latest member
JeremyMedl

Latest Threads

Top