Forum Discussion
DFOTA
Apr 10, 2025Copper Contributor
.Net mail message, PowerShell and Microsoft Purview Infrmation Protection
I have a PowerShell script that using the .net mail message to send emails. We want to restrict some of those emails to a certain sensitivity (we call it classification) and restrict it to only inter...
Bart_Pasmans
Aug 07, 2025Copper Contributor
If the SMTP server is not in O365 (but for instance on-premises with Exchange)
What you could do is:
- Add a custom header to your mail message
- Configure the SMTP server to check the custom header and act accordingly on this
For instance add header "X-ClassificationLabel" give it value "InternalOnly" or something. And apply the business logic on the SMTP to for instance prevent forwarding out of the organization.
Is this something you are searching for?