• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Java Mail Project

 
ranjeeth ravindran
Greenhorn
Posts: 10
Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can any one help me with my project

i am trying to retrieve gmail contacts from my GMail account using JAVA.

i have tried a lot using different api's but its not working its giving me ParserCursor error and i am not getting the api which contains ParserCursor class.

Is there any other simple way to do so.

 
Ben Logan
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which API have you gone with? g4j is probably the best.
 
ranjeeth ravindran
Greenhorn
Posts: 10
Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ya i have tried with g4j api but its not working

can you tell me exactly how to retrieve contacts from my GMail account using g4j api
 
Rob Spoor
Sheriff
Pie
Posts: 20494
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This has nothing to do with user interfaces. Moving to Other JSE / JEE APIs.
 
zakur khan
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
[Thread hijack removed: please start your own question in your own new topic.]
 
Ben Logan
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ranjeeth ravindran wrote:ya i have tried with g4j api but its not working

can you tell me exactly how to retrieve contacts from my GMail account using g4j api


GMConnector.getContact() will return an array of contacts.

Try this for a good example:
http://www.codeuu.com/wiki/Gmail_Address_Book_Exporter
 
ranjeeth ravindran
Greenhorn
Posts: 10
Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks but when i am running the project its gining me LoginException and saying Login failed.

I have ran the program according to the steps given in the html file

Please Help
 
Ben Logan
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hmm. All I can suggest is adding some printlns before the login() call to ensure your username and password are read correctly. If they look fine, try stepping into the GMConnector to see what it's doing. Unfortunately, as is, the example doesn't tell you much when something goes wrong!
 
ranjeeth ravindran
Greenhorn
Posts: 10
Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have used printlns and printed the statements.

Its taking the username and password correctly but its still not logging in.

its showing me the foll error

Feb 18, 2010 1:38:04 AM siuying.gm.Messages <clinit>
WARNING: Cannot load resource bundle! Loading default gmailer bundle ...
Feb 18, 2010 1:38:04 AM siuying.gm.GMConnector <init>
INFO: Initializing ...
Feb 18, 2010 1:38:04 AM siuying.gm.GMConnector <init>
INFO: Initialization done.
Feb 18, 2010 1:38:04 AM siuying.gm.GMConnector connect
INFO: Request Body: org.apache.commons.httpclient.methods.PostMethod@7b6889
Feb 18, 2010 1:38:06 AM siuying.gm.GMConnector connect
WARNING: Connect failed:

Please help.
 
Ben Logan
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Apologies for the late response. Have you had any luck pulling down the source? I tried at access the cvs listed on sourceforge but it doesn't seem to be there anymore.

Admittedly it's been awhile since I last worked with it. I'll have to see if I've got it locally somewhere.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic