Java - get contacts from outlook

1.3k Views Asked by At

I need to get contact list from Outlook Exchange. The problem is that I have to use Java and I totally don't know where to start. Can anyone tell me what I have to do firstly?

How can I programmaticaly connect to Outlook?

1

There are 1 best solutions below

0
On

If you are running on Windows you can probably use JaWin. It is an open source library that wraps COM object and provides you a Java API to access them. As far as I remember its distribution contains example of how to connect to MS Exchange server.

Other similar packages I know are

Jintegra (costs some money)
Jinterop (open source too)

Both libraries implement DCOM protocol in Java, so you can run application that uses them on any platform and connect to exchange server.

Other way is to use POP3 or SMTP protocol also supported by Exchange. There are a lot of packages that support them, e.g. JavaMail.

And the last way: if your application is running on client side, i.e. on the client's computer it can parse files created by outlook itself. I do not remember where these files are stored but I remember that many years ago I have discovered the issue and saw that all emails are stored in file system in clear text format.

EDIT: Recently I found out JACOB: other library that uses JNI (like JaWin).