MAPI and NT Service

Michel Orengo michelorengo at netscape.com
Wed Feb 2 15:30:40 EST 2000


I have spent a little bit more time on this issue...

Actually, I am using cc-mail - which I believe is the source of my problems...

I test again the script with the interactive session and at the statement:
outbox = session.Outbox

I had the following error:

"MAPI was unable to load the information service CCDB8.DLL. Be sure the service
is correctly installed and configured"

I looked at the MSDN Library, and found that if I use cc-mail I had to create
Personal Folders (why?)
So be it, I created the personal folders.
It didn't do it, tough.

Since, I was pissed at cc-mail, I looked around the office to find a computer
without cc-mail on it.
I founded a Win95, where I installed Outlook (so that I can have a better MAPI)
After installation of pythonwin, I ran the script in the interactive window
WITHOUT any problem.

Well, it looks like I need to find an NT without cc-mail and test it on it.
That might take a little longer...but I keep you posted...

Thanks for your help.

Michel

Mark Hammond wrote:

> The fact that the logon worked really doesnt mean much Im afraid.  If you
> are really keen, you should see of you can use the win32com.mapi stuff to
> get at the Outbox - Im guessing you will see the same problem - logon works,
> but access to the folders fails...
>
> Mark.
>
> > -----Original Message-----
> > From: Michel Orengo [mailto:michelorengo at netscape.com]
> > Sent: Wednesday, 2 February 2000 5:37 AM
> > To: Mark Hammond
> > Subject: Re: MAPI and NT Service
> >
> >
> > Mark Hammond wrote:
> >
> > > MAPI defers alot of security stuff until actually needed.  What user
> > > is the service logged on as?  I would guess that it is NT/Exchange
> > > security related rather than your script...
> > >
> >
> > I don't think it is related to the security stuff, because I logged fine
> > with MAPILogonEX.
> > As I answer to Bill - who helped me previously:
> >
> > <QUOTE>
> > With:
> >
> > import mapi
> > mapi.MAPIInitialize((mapi.MAPI_INIT_VERSION, mapi.MAPI_NT_SERVICE))
> > rawSession = mapi.MAPILogonEx(0, <profile name>, <password>,
> > mapi.MAPI_EXPLICIT_PROFILE | mapi.MAPI_NEW_SESSION | mapi.MAPI_NO_MAIL |
> >
> > mapi.MAPI_NT_SERVICE)
> >
> > session = win32com.client.Dispatch("MAPI.Session")
> > session.Logon(profileName=<blah>, profilePassword=<blah>, showDialog=0,
> > newSession = 0, NoMail=1)
> >
> > The latest line fails (same as I had before)
> >
> > But then I realized that with that code I was logging twice:
> >  - first with mapi.MAPILogonEX
> >  - then with session.Logon
> >
> > I figured out that it might have a way to map a MAPI object with a CDO
> > Object
> > since CDO is built on top of MAPI.
> > Looking at the the CDO doc, I found the MAPIOBJECT property that hold
> > the MAPI
> > handle.
> > I gave it a try with:
> >
> > session.MAPIOBJECT = rawSession
> >
> > then:
> >
> > outbox = session.Outbox
> >
> > and it worked!
> >
> > However, since I was in a trial mode, I did that using the interactive
> > session.
> >
> > I tried with my NT Service but it failed on:
> >
> > outbox = session.Outbox
> >
> > Unfortunately, I didn't have time to look into it very seriously. I plan
> > to
> > spend more time on this in the near future, but other projects deadlines
> > force
> > me to hold on this project.
> >
> > <UNQUOTE>
> >
> > The project is still on hold, I hope to work on it very soon.
> > In the meantime, if you have any suggestion...
> >
> > Thanks for your help
> > Michel
> >
> >
> >





More information about the Python-list mailing list