×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Registered User
    Join Date
    Aug 2010
    Posts
    5

    connecting to gmail using j2me

    Hi,
    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);
    http.setRequestMethod(HttpsConnection.GET);
    System.out.println("Code: " + http.getResponseCode());

  2. #2
    Super Contributor
    Join Date
    Jun 2003
    Location
    Cheshire, UK
    Posts
    7,395

    Re: connecting to gmail using j2me

    Welcome to Forum Nokia!!

    IMAP usually uses port 143.

    You can't open a socket to 443 - it's forbidden.

    HttpsConnection is only for connecting to HTTPS services, not to IMAP.

    What exceptions are you getting? And why are you using port 443?

    Graham.

  3. #3
    Super Contributor
    Join Date
    Apr 2003
    Location
    USA, CA
    Posts
    7,191

    Re: connecting to gmail using j2me

    ni30rocks,

    Have you checked the gmail's IMAP instructions at all. You are using incorrect imap server address to start with...
    http://mail.google.com/support/bin/a...y?answer=78799

    Hartti

  4. #4
    Registered User
    Join Date
    Aug 2010
    Posts
    5

    Re: connecting to gmail using j2me

    1. https connection making on port 443 :- Simply returns ERROR

    2. https connection making on port 993 :- Error is "Certificate was issued by an unrecognized entityException"

    3. https connection making on port 143 : ConnectionNotFound error in socket:pen : error = 10060 Exception


    Host Address I am using is : www.gmail.com or imap.gmail.com both giving same exception.

    However , Code sanp1 :
    StreamConnection socket;
    socket = (StreamConnection)Connector.open("socket://imap.gmail.com:993");

    Actually it does not provide any exception but I do not know how to send user name and password then.....?

  5. #5
    Super Contributor
    Join Date
    Apr 2007
    Posts
    2,708

    Re: connecting to gmail using j2me

    Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them.

  6. #6
    Registered User
    Join Date
    Mar 2003
    Posts
    4,105

    Re: connecting to gmail using j2me

    ni30rocks, for additional answers, please, let us continue in your other (new) thread…

Similar Threads

  1. Gmail - J2ME - S60 3rd/5th edition
    By tempwarez in forum Mobile Java Networking & Messaging & Security
    Replies: 18
    Last Post: 2010-07-13, 19:47
  2. help on connecting EJBs with J2me
    By kemmal in forum Mobile Java General
    Replies: 2
    Last Post: 2010-04-01, 11:38
  3. Connecting to server from J2ME
    By dhiraj.deka in forum Mobile Java General
    Replies: 2
    Last Post: 2009-11-20, 11:29
  4. gmail for j2me
    By vivartpandey in forum Mobile Java General
    Replies: 3
    Last Post: 2008-11-19, 04:30
  5. Error in connecting to gmail :(
    By kamodo in forum Mobile Java General
    Replies: 0
    Last Post: 2005-07-14, 07:39

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×