I am trying to remove a warning set by the local policy that adds a warning to the body of every inbound email that originates from outside the organization.
This clouds the summary pane of emails with the same warning and I cannot determine whether the email is intended for me or not.
I have tried:
Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
Item.HTMLBody = Replace(Item.HTMLBody, "CAUTION: This email originated from outside of the organization. This message might not be safe, use caution in opening it. If in doubt, do not open the attachment nor links in the message.", "")
End Sub
Without success, however.
This is the warning html added to each email:
<div style="background-color:#FFEB9C; width:100%; border-style: solid; border-color:#9C6500; border-color:#9C6500; border-width:1pt; padding:2pt; font-size:10pt; line-height:12pt; font-family:'Calibri'; color:Black; text-align: left;">
<span style="color:#9C6500; font-weight:bold;">CAUTION:</span> This email originated from outside of the organization. This message might not be safe, use caution in opening it. If in doubt, do not open the attachment nor links in the message.</div>
<br>
I need this to be completely removed as best case, or just the text so that it does not cloud my summary reading pane on outlook or phone.