Note that there are some explanatory texts on larger screens.

plurals
  1. POjavax.mail blocking while trying to connect
    primarykey
    data
    text
    <p>I'm confronted to something disturbing. I'm setting up a POP account receiver, and it looks like it's working in some cases. When I connect to my server with the port 110, it's working OK (just have an error message when trying to connect with SSL, which is normal). But when I try the port 995, which should be working with SSL, it looks like javax.mail (1.4.3) is blocking while executing an input.readLine() command (marked as deprecated, BTW), instead of throwing the IOException it is supposed to throw...</p> <p>I'm going to add a timeout to prevent this, but wanted to have your opinion on this. Does someone already experienced this? Any idea on how to get over it?</p> <p>This is how I'm creating my Store object:</p> <pre><code>Properties pop3Props = new Properties(); pop3Props.setProperty("mail.pop3.socketFactory.class", "javax.net.ssl.SSLSocketFactory"); pop3Props.setProperty("mail.pop3.socketFactory.fallback", "false"); pop3Props.setProperty("mail.pop3.port", Integer.toString(hostPort)); pop3Props.setProperty("mail.pop3.socketFactory.port", Integer.toString(hostPort)); pop3Props.setProperty("mail.pop3.starttls.enable", String.valueOf(STARTTLS)); pop3Props.setProperty("mail.pop3.auth", String.valueOf(AUTH)); // Create session and URL Session session = Session.getInstance(pop3Props, null); session.setDebug(true); URLName url = new URLName(POP3, host, hostPort, "", username, password); // Create the store if (useSSL) { return new POP3SSLStore(session, url); } else { return new POP3Store(session, url); } </code></pre> <p>This is how I'm trying to connect on this object:</p> <pre><code>store.connect(host, hostPort, username, password); </code></pre> <p>And this is the javax.mail line which is making everything freeze (original comment included):</p> <pre><code>String line = input.readLine(); // XXX - readLine is deprecated </code></pre> <p>Thank you very much for your help!</p> <p>Morgan</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload