1 | if (sslEnabled && sslType == IncomingItem.IMAPS_POP3S) {↵ | | 1 | if (sslEnabled && sslType == IncomingItem.IMAPS_POP3S) {↵
|
2 | try {↵ | | 2 | try {↵
|
3 | protocol.openSSLPort();↵ | | 3 | protocol.openSSLPort();↵
|
4 | usingSSL = true;↵ | | 4 | usingSSL = true;↵
|
5 | } catch (SSLException e) {↵ | | 5 | } catch (SSLException e) {↵
|
6 | int result = showErrorDialog(MailResourceLoader.getString(↵ | | 6 | int result = showErrorDialog(MailResourceLoader.getString(↵
|
7 | "dialog", "error", "ssl_handshake_error")↵ | | 7 | "dialog", "error", "ssl_handshake_error")↵
|
8 | + ": "↵ | | 8 | + ": "↵
|
9 | + e.getLocalizedMessage()↵ | | 9 | + e.getLocalizedMessage()↵
|
10 | + "\n"↵ | | 10 | + "\n"↵
|
11 | + MailResourceLoader.getString("dialog", "error",↵ | | 11 | + MailResourceLoader.getString("dialog", "error",↵
|
12 | "ssl_turn_off"));↵ | | 12 | "ssl_turn_off"));↵
|
|
13 | if (result == 1) {↵ | | 13 | if (result == JOptionPane.CANCEL_OPTION) {↵
|
14 | throw new CommandCancelledException();↵ | | 14 | throw new CommandCancelledException();↵
|
15 | }↵ | | 15 | }↵
|
|
16 | // turn off SSL for the future↵ | | 16 | // turn off SSL for the future↵
|
17 | item.setBoolean("enable_ssl", false);↵ | | 17 | popItem.setBoolean("enable_ssl", false);↵
|
18 | item.setInteger("port", IMAPProtocol.DEFAULT_PORT);↵ | | 18 | popItem.setInteger("port", POP3Protocol.DEFAULT_PORT);↵
|
|
19 | // reopen the port↵ | | 19 | // reopen the port↵
|
20 | protocol.openPort();↵ | | 20 | protocol.openPort();↵
|
21 | }↵ | | 21 | }↵
|
22 | } else {↵ | | 22 | } else {↵
|
23 | protocol.openPort();↵ | | 23 | protocol.openPort();↵
|
24 | } | | 24 | }
|