Add and ensure persistence of custom internet headers for emails in Exchange On-Premise
Questions:
- Is there any way to add Internet headers that persist through SMTP using EWS or any other method available in an on-prem Exchange environment?
- If Internet headers are not feasible, are there alternative fields that can be used for tracking classification metadata through SMTP?
- Are there specific Exchange configurations that might strip or block custom headers, and how can they be adjusted?
Environment: Exchange Server (On-Premises 2019 CU-15 / SE Edition) Outlook Add-in using Office JS (Mac Old UI, New UI, Browsers) EWS SOAP API for backend communication
I have explored multiple approaches but encountered limitations:
Office JS API (Requirement Set 1.5)
- Does not support modifying Internet headers.
- The closest option is setting Extended Properties, but these do not persist through SMTP.
EWS SOAP API (UpdateItem, SetItem, CreateItem)
- Allows setting Extended Properties, but they are not included in the final email headers when processed by Exchange.
- No direct method exists to modify Internet headers in a way that persists through SMTP delivery.
The Issue: Since Extended Properties do not propagate via SMTP, I need an alternative way to ensure that classification metadata is preserved and can be retrieved at the recipient’s end as well as during replies and forwards.Questions:
- Is there any way to add Internet headers that persist through SMTP using EWS or any other method available in an on-prem Exchange environment?
- If Internet headers are not feasible, are there alternative fields that can be used for tracking classification metadata through SMTP?
- Are there specific Exchange configurations that might strip or block custom headers, and how can they be adjusted?
Environment: Exchange Server (On-Premises 2019 CU-15 / SE Edition)
Outlook Add-in using Office JS (Mac Old UI, New UI, Browsers)
EWS SOAP API for backend communication
I have explored multiple approaches but encountered limitations:
Office JS API (Requirement Set 1.5)
- Does not support modifying Internet headers.
- The closest option is setting Extended Properties, but these do not persist through SMTP.
EWS SOAP API (UpdateItem, SetItem, CreateItem)
- Allows setting Extended Properties, but they are not included in the final email headers when processed by Exchange.
- No direct method exists to modify Internet headers in a way that persists through SMTP delivery.
The Issue: Since Extended Properties do not propagate via SMTP, I need an alternative way to ensure that classification metadata is preserved and can be retrieved at the recipient’s end as well as during replies and forwards.