Reputation: 735
Safelinks in Outlook 365 are horrendous. Is there a reason why they put the full link into the text body?
I mean, is there a reason they aren't like this:
<html>
<head />
<body>
<a href="https://aus01.safelinks.protection.outlook.com/">https://www.originallink.com/</a>
</body>
</html>
so you can parse the original link whilst still being 'protected'? Is there a option to display them like this, rather than just turning off Safelinks altogether?
Upvotes: 1
Views: 328
Reputation: 49395
You can develop VBA macro or COM add-in where you could replace hyperlinks with your own format. For that you need to handle the NewMailEx
event of the Outlook Application
class which is fired for every received item that is processed by Microsoft Outlook. The item can be one of several different item types, for example, MailItem
, MeetingItem
, or SharingItem
. The EntryIDsCollection
string contains the Entry ID that corresponds to that item.
The NewMailEx
event fires when a new message arrives in the Inbox and before client rule processing occurs. Use the Entry ID returned in the EntryIDCollection
string to call the NameSpace.GetItemFromID method and process the item.
In the event handle you have access to the HTMLBody
property where you can find all hyperlinks and do the required replacements.
Upvotes: 0