以前の会話と同様に、手動で Outlook のメールに返信しようとしています。しかし、以下のコードはいくつかのエラーを出しています: 受信者アドレスに送信できませんでした..メールを送った人に返送する方法を知る必要があります..
import win32com.client, datetime
from datetime import timedelta
outlook =win32com.client.Dispatch("Outlook.Application").GetNamespace("MAPI") # to trigger outlook application
inbox = outlook.GetDefaultFolder(6) # 6 is used for the index of the folder
messages = inbox.Items
message = messages.GetLast()# message is treated as each mail in for loop
for message in messages:
if message.Subject=="request": # based on the subject replying to email
#body_content = message.body
message.Reply()
message.Body = "shortly will be processed!!!"
message.Send()