I am trying to use the win32 Python library to send some emails, but I am unable to specify the sensitivity label in an automatic way. As soon as I try to send out the email by using the below code, the Azure Information Protection dialog box pops up making this impossible to automate.
As I understood from reading various articles, there might be a workaround specifying the GUID string, but I have no idea how to do it.
I would really appreciate if you could help me out!
outlook = win32com.client.Dispatch('outlook.application')
mail = outlook.CreateItem(0)
mail.To = 'emailaddress@email.com'
mail.Subject = 'Sample Email'
mail.HTMLBody = '<h3>This is HTML Body</h3>'
mail.Body = "This is the normal body"
mail.Sensitivity = 3
mail.Send()
from Outlook emails with Python - Azure Information protection label
No comments:
Post a Comment