File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Other JSE/JEE APIs and the fly likes Java Mail Project Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "Java Mail Project" Watch "Java Mail Project" New topic
Author

Java Mail Project

ranjeeth ravindran
Greenhorn

Joined: Feb 13, 2010
Posts: 10

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

Joined: Feb 13, 2010
Posts: 12
Which API have you gone with? g4j is probably the best.
ranjeeth ravindran
Greenhorn

Joined: Feb 13, 2010
Posts: 10

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

Joined: Oct 27, 2005
Posts: 19684
    
  20

This has nothing to do with user interfaces. Moving to Other JSE / JEE APIs.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
zakur khan
Greenhorn

Joined: Apr 19, 2009
Posts: 3
[Thread hijack removed: please start your own question in your own new topic.]
Ben Logan
Greenhorn

Joined: Feb 13, 2010
Posts: 12
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

Joined: Feb 13, 2010
Posts: 10

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

Joined: Feb 13, 2010
Posts: 12
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

Joined: Feb 13, 2010
Posts: 10

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

Joined: Feb 13, 2010
Posts: 12

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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Java Mail Project