[python-win32] How to save the mails as it is in their own format

Antony Joseph antonyjoseph89 at gmail.com
Sat Dec 29 06:22:42 CET 2007


Hi all,

1. I am working on a project , which i want to access the Microsoft outlook
inbox, and get the mails and save it locally as it is.

2. This works to read the mails from Micrsoft outlook but its fails to get
the mails from the outlook Express,.
I run this code in windows machine , in that machine i hadn't install any
microsoft product including Ms outlook.
I am trying to get the mails from Outlook Express.

import win32com.client
session = win32com.client.Dispatch("MAPI.Session")
session.Logon()
inbox = session.Inbox
collmsg = inbox.Messages
print  collmsg
msg = collmsg.GetFirst()
while msg:
    print "subject: ", msg.subject
    msg = collmsg.GetNext()
session.Logoff()

could anybody tell me what changes should i want to done , to run
successfully?

pls if there any links , which could more usefull to me pls forward to me.


Thanks

Antony
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/python-win32/attachments/20071229/38a44f66/attachment.htm 


More information about the python-win32 mailing list