[python-win32] mail Sensitivity doesn't work as expected(can not set the sensitivity label)
Victor Liu
phenome321 at gmail.com
Mon Nov 22 06:07:33 EST 2021
Hi Marchi
This is a genius idea, it works well for me. Thank you very much.
Regards
Victor
> On 19 Nov 2021, at 06:27, marchi.gianluca at libero.it wrote:
>
> Hope this can clarify. Let me know if not.
>
>> Il 18/11/2021 14:40 Victor Liu <phenome321 at gmail.com> ha scritto:
>>
>>
>> Hi Marchi
>>
>> Thanks for mentioning your workaround. Is it possible to share your template with me or even just the part that controls sensitivities ? Yes, we are going to use template very soon, which will make a lot of things easier, so if there is a workaround in the template, then that is possibly the best solution so far.
>>
>> Regards
>> Victor
>>
>>> On 17 Nov 2021, at 22:30, marchi.gianluca at libero.it <mailto:marchi.gianluca at libero.it> wrote:
>>> I had the same problem. I have not found any way to control azure information with python.
>>> Anyway my workaround was to manually save a template with the correct sensitivity, with all other info (to, subject, body test,etc.) empty.
>>> Then in the code I do not create a new email but recall the template.
>>> Hotel this could help.
>>>
>>> --
>>> Inviato da Libero Mail per Android
>>>
>>> Mercoledì, 17 Novembre 2021, 11:02PM +01:00 da Victor Liu phenome321 at gmail.com <mailto:phenome321 at gmail.com>:
>>>
>>> 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 = 'victor at example.com <mailto:victor at example.com>'
>>> mail.Subject = 'Sample Email'
>>> mail.HTMLBody = '
>>> This is HTML Body
>>>
>>> '
>>> mail.Body = "This is the normal body"
>>> mail.CC = 'victor at example.com <mailto:victor at example.com>'
>>> 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
>>> python-win32 at python.org <mailto:python-win32 at python.org>
>>> https://mail.python.org/mailman/listinfo/python-win32 <https://mail.python.org/mailman/listinfo/python-win32>
>>
> <template for outlook automation.pptx>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.python.org/pipermail/python-win32/attachments/20211122/173a1fb4/attachment.html>
More information about the python-win32
mailing list