AW: [python-win32] Connecting to Exchange in a MAPI.Session from
aservice.
Martin Möllenbeck
Martin.Moellenbeck at t-online.de
Sun Nov 7 12:52:26 CET 2004
maybe you use the system account to run the service and must
use the 'loggedon' user account
ciao
martin
> -----Ursprüngliche Nachricht-----
> Von: python-win32-bounces at python.org
> [mailto:python-win32-bounces at python.org] Im Auftrag von Aaron
> Patrick Lehmann
> Gesendet: Sonntag, 7. November 2004 12:45
> An: python-win32 at python.org
> Betreff: [python-win32] Connecting to Exchange in a
> MAPI.Session from aservice.
>
> Hello all--
>
> I'm trying to use the following code to set up a MAPI.Session
> with an Exchange
> server. It works fine from the command prompt, but when I
> try to run it as a
> service it fails with a MAPI_E_LOGON_FAILED Error.
>
>
> def _getCDO(self, profile, password ):
> """
> This method gets a CDOSession.
>
> Arguments:
>
> --------------------------------------------------------------
> profile: Tracker's profile name on the
> Windows Computer.
> password: Tracker's password for this profile
>
> Returns:
>
> --------------------------------------------------------------
> A CDO Session
> """
>
> CoInitialize( )
> #Initialize COM, if it hasn't been initialized already.
> cdo = Dispatch("MAPI.Session", "Tracker")
> cdo.Logon(profile, password, False)
> return cdo
>
> Is there something extra I need in order to run this code as
> a service? I
> appreciate your help.
>
> Aaron Lehmann
> --
> Why do the Democrats complain about Nader losing them
> Presidential elections?
> Republicans don't complain about Libertarians.
> _______________________________________________
> Python-win32 mailing list
> Python-win32 at python.org
> http://mail.python.org/mailman/listinfo/python-win32
>
More information about the Python-win32
mailing list