For an email that I send automatically via python with the win32com library I need to add something to the email header property. Code is like this:
olMailItem = 0x0
obj = win32com.client.Dispatch("Outlook.Application")
newMail = obj.CreateItem(olMailItem)
newMail.Subject = "test mail"
newMail.BodyFormat = 2
newMail.HTMLBody = html_out
newMail.To = email_recipient
newMail.PropertyAccessor.SetProperty("http://schemas.microsoft.com/mapi/string/%7B00020386-0000-0000-C000-000000000046%7D/_test_", 'xyz')
Now I'm having issues with the underscores in the schemaName so it won't accept "_test_". Somehow I can escape the first underscore in the python way with a backslash like that ...%7D/\_test_", 'xyz')
which would then work if I remove the second underscore. However for the second underscore I have not found a solution to escape it so that it is accepted.
Basically Outlook should be able to handle this because I read _test_ out of an exiting email header.
Any clue here? I can not find any restrictions for the string namespace