Ich bin neu in Python. Ich möchte .MSG Datei in Python zu lesen und zu tun Parsen zur Zeit versuche ich, folgenden CodeWie zu öffnen. MSG-Datei in Python
def read_mail(msg):
import win32com.client
outlook = win32com.client.Dispatch("Outlook.Application").GetNamespace("IMAP")
msg=outlook.OpenSharedItem(msg)
mail_list=[];
mail_list.append(msg.SenderName)
mail_list.append(msg.SenderEmailAddress)
mail_list.append(msg.SentOn)
mail_list.append(msg.Subject)
mail_list.append(msg.Body)
del outlook, msg
return mail_list
msg=("samples\\UseCase1.msg")
read_mail(msg)
ich bin immer Fehler wie diese
IDispatch = pythoncom.CoCreateInstance(IDispatch, None, clsctx, pythoncom.IID_IDispatch)
com_error: (-2146959355, 'Server execution failed', None, None)