Monitoring an MS Exchange mailbox
Tim Golden
tim.golden at viacom-outdoor.co.uk
Tue Dec 30 09:30:38 EST 2003
Tim Golden <tim.golden at viacom-outdoor.co.uk> wrote in message news:<mailman.34.1072779887.8134.python-list at python.org>...
> >From: Lindstrom Greg - glinds [mailto:Greg.Lindstrom at acxiom.com]
> > [snip request to avoid logon prompt when attaching to MS Exchange]
>
>
> You have three options that I can think of.
>
[snip examples (1) & (2)]
> 3) One other option, with limitations, is to construct a
> profile info string on the fly, and pass that to the
> logon method:
>
> <code>
> import win32com.client
>
> EXCHANGE_SERVER = "xyz"
> MAILBOX_NAME = "tim.golden"
> #
> # Obviously replace the server and
> # mailbox names to suit.
> #
>
> session = win32com.client.Dispatch ("MAPI.Session")
> session.Logon ("%s\n%s" % (EXCHANGE_SERVER, MAILBOX_NAME))
> </code>
Oops. That last line should read:
session.Logon (ProfileInfo="%s\n%s" % (EXCHANGE_SERVER, MAILBOX_NAME))
Sorry; that's the only one I didn't cut-and-paste into a
Python session before posting. Just goes to show...
TJG
More information about the Python-list
mailing list