[英]Reply to an Outlook email in the same email history/conversation using the MessageID and Win32com module in Python
[英]How to reply to a mail in Outlook(win app) using python?
我想使用 Python 在 Outlook Web 應用程序中回復郵件。 我正在使用軟件包 win32com.client 發送郵件,但沒有收到任何有關回復的信息。 誰能分享一下代碼....
您在https://docs.microsoft.com/de-de/office/vba/api/outlook.application下找到 Application Object API 'replying to an E-Mail' 不是通用的,因為您必須在您中查找它自定義文件夾結構。
介紹一個 API 使用示例(發送電子郵件):
import win32com.client as win32
if __name__ == '__main__':
outlook = win32.Dispatch('outlook.application')
mail = outlook.CreateItem(0)
mail.To = 'someone@example.com'
mail.Subject = 'Something important'
# to set a text-body
mail.Body = 'Lorem Ipsum'
# for completness only, the html-body:
mail.HTMLBody = '<h1>HTML Message body</h1>'
attachment = "Path to the attachment"
mail.Attachments.Add(attachment)
mail.Send()
pass
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.