Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Java Libray to extract email Contact Only from Outlook file

Reply
Thread Tools

Java Libray to extract email Contact Only from Outlook file

 
 
pcouas
Guest
Posts: n/a
 
      10-28-2005
Hi,

Does anyone know of a Java library that can extract email contact ONLY
from Outlook .pst files.
I just need to get email list from pst file in real time for my Java
Applet.


Regards
Philippe

 
Reply With Quote
 
 
 
 
Roedy Green
Guest
Posts: n/a
 
      10-28-2005
On 28 Oct 2005 00:45:41 -0700, "pcouas" <(E-Mail Removed)> wrote,
quoted or indirectly quoted someone who said :

>Does anyone know of a Java library that can extract email contact ONLY
>from Outlook .pst files.
>I just need to get email list from pst file in real time for my Java
>Applet.


If you can't find what you want, perhaps Outlook has some export
format that is more tractable.

The format looks to be unusually opaque to figuring it out by
experiment.
--
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.
 
Reply With Quote
 
 
 
 
John
Guest
Posts: n/a
 
      10-28-2005
Roedy Green wrote:

> The format looks to be unusually opaque to figuring it out by
> experiment.


You can post that again! PST is a nightmare format. All of the tools
that I've seen for converting it only work in a patchy way.

The best way to do it AFAIK is to upload the files to an IMAP server
using outlook and then download them using a proper email client.

For the OP's problem, perhaps he could either convert the files ahead of
time in this way, or somehow incorporate a live IMAP server and just
access the mail from there.

John
 
Reply With Quote
 
Rogan Dawes
Guest
Posts: n/a
 
      10-28-2005
Roedy Green wrote:
> On 28 Oct 2005 00:45:41 -0700, "pcouas" <(E-Mail Removed)> wrote,
> quoted or indirectly quoted someone who said :
>
>
>>Does anyone know of a Java library that can extract email contact ONLY

>
>>from Outlook .pst files.

>
>>I just need to get email list from pst file in real time for my Java
>>Applet.

>
>
> If you can't find what you want, perhaps Outlook has some export
> format that is more tractable.
>
> The format looks to be unusually opaque to figuring it out by
> experiment.


Note that you'd have to use a signed applet to get access to the PST in
the first place. Disregarding entirely the fact that the address book is
typically not stored in the PST in the first place, but rather a .PAB file.

It sounds to me like you want your applet to be able to send email on
the user's behalf. But if the user is using outlook, you may have to
send email via MAPI (not IMAP), which, as far as I know, has ZERO
support in Java.

I'd suggest looking at this in a different way, if at all possible.

Perhaps you can simply present a mailto: link, and let the user just
click on it to send an email? Outlook can automatically resolve email
links like

mailto:bloggs, joe

using the address book, so that might work for you.

Rogan
 
Reply With Quote
 
pcouas
Guest
Posts: n/a
 
      10-28-2005
"Mail to", could not transfert attachement ?
I want, reading adress from outlook and sending mail from my Signed
Applet ?

Philippe

 
Reply With Quote
 
Dave
Guest
Posts: n/a
 
      10-29-2005
Not sure about your budget, but I found this is good for dealing with
outlook appointments, contacts, etc...

http://www.kova-solutions.com/joc/

pcouas wrote:
> "Mail to", could not transfert attachement ?
> I want, reading adress from outlook and sending mail from my Signed
> Applet ?
>
> Philippe


 
Reply With Quote
 
pcouas
Guest
Posts: n/a
 
      10-31-2005
I have found a solution with OpenSource Project Jacob

package Activex01;

import com.jacob.activeX.*;
import com.jacob.com.*;


public class getContacts {
public static void main(String[] args) {
final int olFolderContacts = 10;

ActiveXComponent ol = new ActiveXComponent("Outlook.Application");
Dispatch dsp = new Dispatch();

Dispatch olo = ol.getObject();
Dispatch myNamespace = Dispatch.call(olo, "GetNamespace",
"MAPI").toDispatch();
Dispatch myFolder = Dispatch.call(myNamespace, "GetDefaultFolder",new
Integer(olFolderContacts)).toDispatch();

//nächste zeile Fehlermeldung

Dispatch items = Dispatch.get(myFolder, "Items").toDispatch();

int count = Dispatch.call(items, "Count").toInt();

for (int i = 1; i <= count; i++) {
Dispatch item;
item = Dispatch.call(items, "Item", new Integer(i)).toDispatch();

String fullName = Dispatch.get(item, "Fullname").toString();
String emailAddress = Dispatch.get(item, "Email1Address").toString();
String addressStreet = Dispatch.get(item, "BusinessAddressStreet")
..toString();
String addressCity = Dispatch.get(item, "BusinessAddressCity")
..toString();
String addressCountry = Dispatch.get(item, "BusinessAddressCountry")
..toString();
String addressPostalCode = Dispatch.get(item,
"BusinessAddressPostalCode").toString();
String addressState = Dispatch.get(item, "BusinessAddressState")
..toString();
String title = Dispatch.get(item, "Title").toString();
String phone = Dispatch.get(item, "BusinessTelephoneNumber")
..toString();
String fax = Dispatch.get(item, "BusinessFaxNumber").toString();

printField("", fullName);
printField("", title);
printField("", addressStreet);
printField("", addressCity);
printField("", addressState);
printField("", addressPostalCode);
printField("", addressCountry);
printField("Tel:", phone);
printField("Fax:", fax);
printField("Email:", emailAddress);

System.out.println();
}
}

public static void printField(String label, String value) {
if (value.length() != 0) {
System.out.println(label + " " + value);
}
}
}

 
Reply With Quote
 
praitheesh praitheesh is offline
Junior Member
Join Date: Dec 2008
Posts: 3
 
      07-08-2009
can you please give example code to get and read the .pst file.?
 
Reply With Quote
 
Denis_IBM Denis_IBM is offline
Junior Member
Join Date: Dec 2010
Posts: 2
 
      12-18-2010
You should try JPST

Go to: independentsoft.de/jpst
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
gem libray name conflict problem Heesob Park Ruby 5 07-22-2009 02:16 AM
how to export functions in c/c++ static libray? news.videotron.ca C++ 1 02-10-2005 10:59 PM
c++ libray for http protocol B.C. C++ 4 11-06-2004 02:12 PM
help:how can i get the libray about bioinfromatics hugo C++ 1 08-16-2004 01:39 PM
Getting email extractors to only extract one folder and not everything in the Outlook Express email program Jimchip Computer Support 18 06-29-2003 10:10 PM



Advertisments