MS Exchange API

Is there a freeware component-set or a Delphi API header for "communication" between a Delphi (5) application and a MS Exchange server.

I need to "extract" user information from an Exchange server (User IDs and EMail addresses).
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

You should be able to connect to exchange using COM using the file:
this file is a COM/DLL, which means you have to convert the dll file into a _TLB.Pas file. The pas file has many functions&properties which you can use :

 property AddressLists: OleVariant readonly dispid 4;
    property OutOfOffice: OleVariant dispid 82;
    property OutOfOfficeText: OleVariant dispid 83;
    function Logon(ProfileName: OleVariant; ProfilePassword: OleVariant; ShowDialog: OleVariant;
                   NewSession: OleVariant; ParentWindow: OleVariant; NoMail: OleVariant;
                   ProfileInfo: OleVariant): OleVariant; dispid 119;
    function Logoff: OleVariant; dispid 118;

Just a very small snippet of these functions...

To generate the pas file under D4 do the following:
-Import Type library
-Click add, and browse for cdo.dll
-then click the ... button and select a working directory, (your project directory where you will keep your delphi project).
-Click OK.
Now you have the TLB.pas file open in delphi and saved in your project directory..
In your delphi app say unit1, add MAPI_TLB to your uses clause.

Create a global variable like so

MyMapiSession : Variant;

To init the session use:

MyMapiSession := CoSession.Create;  // (cosession.create is function in Mapi_TLB file)

you can now use functions & properties of the MymapisSession object... like

MyMapisSession.Logon(ProfileName: OleVariant; ProfilePassword: OleVariant; ShowDialog: OleVariant;
                   NewSession: OleVariant; ParentWindow: OleVariant; NoMail: OleVariant;
                   ProfileInfo: OleVariant;

etc.. unfortunately I do not have exchange and cannot help you any further than this start at the whole thing....

Hope this helps you,
Rob ;-)

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
pellelilAuthor Commented:
Thanx for the help
Pleasure, can you let me know if you made any progress with this ?

Rob ;-)
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.