mail Sensitivity doesn't work as expected(can not set the sensitivity label)

Victor Liu <[email protected]>
Newsgroups gmane.comp.python.windows
Message-ID <[email protected]>
Hi guys,

Gratitude to all the work of the library. I am trying to use it to send out some emails, but I have encountered this issue which might be a bug. It can be represented by this minimum working example.

import win32com.client

outlook = win32com.client.Dispatch('outlook.application')
mail = outlook.CreateItem(0)
mail.To = '[email protected]'
mail.Subject = 'Sample Email'
mail.HTMLBody = '<h3>This is HTML Body</h3>'
mail.Body = "This is the normal body"
mail.CC = '[email protected]'
mail.Sensitivity = 1
mail.Send()
This works well expect the mail.sensitivity =1 part, so it pops up a window to set the sensitivity label(Bear in mind, not all outlook has set up this restriction).
 <https://user-images.githubusercontent.com/7195126/141965903-30c23072-d41d-403a-a11c-69e6e98e9c60.png>
This makes the process is impossible to automate.

My understanding is mail.sensitivity =1 is for that Azure label. Please let me know if I missed something.

Thank you all in advance.
Victor

_______________________________________________
python-win32 mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-win32
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.