Python Script To Create Outlook .msg File
Is there a way to create an Outlook .msg file using Python? I want to generate several .msg files but with different data in the subject line. All the modules I have found are only
Solution 1:
Not directly in Python, but you can either explicitly create an MSG file from the scratch (it format is documented) or use a wrapper like Redemption - it is a regular COM object and can be used in Python using win32com.client.Dispatch
. In VB:
set Session = CreateObject("Redemption.RDOSession")
set Msg = Session.CreateMessageFromMsgFile("C:\Temp\test.msg")
Msg.Sent = true
Msg.Subject = "test"
Msg.Body = "test body"
Msg.Save
Post a Comment for "Python Script To Create Outlook .msg File"