Mark K
Mark K

Reputation: 9376

Require receipts when sending Outlook email by Python

Simple lines to send Outlook email by Python,

referencing from Send email through Python using Outlook 2016 without opening it

import win32com.client as win32

outlook = win32.Dispatch('outlook.application')
mail = outlook.CreateItem(0)
mail.To = '[email protected]'
mail.Subject = 'Message subject'
mail.Body = 'Message body'

mail.Send()

Is it possible to require Delivery Receipt and Read Receipt when sending an email? What would be the good way?

enter image description here

Upvotes: 1

Views: 1599

Answers (1)

0m3r
0m3r

Reputation: 12495

Sure, use ReadReceiptRequested & OriginatorDeliveryReportRequested property MSDN

Example

import win32com.client as win32

outlook = win32.Dispatch('outlook.application')
mail = outlook.CreateItem(0)
mail.To = "[email protected]"
mail.Subject = 'Message subject'
mail.Body = 'Message body'
# request read receipt
mail.ReadReceiptRequested = True
# request delivery receipt
mail.OriginatorDeliveryReportRequested = True
mail.Send()

Upvotes: 3

Related Questions