I am looking to develop an application which fetches mail from gmail through IMAP but I am not able to connect to gmail, always I have a exception. I tried https and socket connection but both ends with exceptiion.
Code snaps are:
1. StreamConnection socket;
socket = (StreamConnection)Connector.open("socket://www.gmail.com:443");// other ports tried 993,587
2. HttpsConnection http = null;
http = (HttpsConnection) Connector.open(url);
System.out.println("Code: " + http.getResponseCode());