[python-win32] Outlook COM: how to create a MailItem from a .msg file

2005-07-08 Thread Guy Lateur
Yes! I finally got it to work. I've written a _vbscript_ which I'll call from python. It uses Outlook.Redemption's SafeMailItem. No need to use IMAP or whatever services.Only weird thing is it doesn't put the msg in the Inbox, as I intended, but in the Drafts folder. Well, never mind that, i

[python-win32] Outlook COM: how to create a MailItem from a .msg file

2005-07-08 Thread Guy Lateur
python version:     import win32com.client   myOL = win32com.client.Dispatch("Outlook.Application")    myNS = myOL.GetNamespace("MAPI")sItem = win32com.client.Dispatch("Redemption.SafeMailItem")   myDestBox = myNS.GetDefaultFolder(6)oItem = myDestBox.Items.Add(0)   sItem.Item = oItemsItem.