-1

I am working on an automation script which should take certain email-ids from an excel/csv sheet and send a mail to these email-ids which should have a voting option. I came across a package pyoutlook but I doubt if i can do any such task.

If not python, i can automate in any other programming language as well.

Ujjawal Sharma
  • 63
  • 1
  • 1
  • 7

1 Answers1

2

You can automate Outlook from Python:

import win32com.client as win32
outlook = win32.Dispatch('outlook.application')
mail = outlook.CreateItem(0)
mail.To = 'To address'
mail.Subject = 'Message subject'
mail.Body = 'Message body'
mail.HTMLBody = '<h2>HTML Message body</h2>' #this field is optional

mail.VotingOptions = "Yes;No"

mail.Send()

The MailItem.VotingOptions property sets a string specifying a delimited string containing the voting options for the mail message. This property uses the character specified in the value name, sList, under HKEY_CURRENT_USER\Control Panel\International in the Windows registry, as the delimiter for multiple voting options.

You may find the Send Outlook Email Via Python? page helpful.

Eugene Astafiev
  • 47,483
  • 3
  • 24
  • 45