MAPI and NT Service
Michel Orengo
michelorengo at netscape.com
Tue Feb 1 13:33:21 EST 2000
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