I have added a custom “New Secure Mail” button to my Outlook add in. When the user clicks the button, I want the new mail dialog to appear, and I want to handle the send button click event so that I can perform some additional actions and potentially cancel the send.
There are plenty of examples here of how to open the new mial dialog from an external application using Microsoft.Office.Interop.Outlook.MailItem but what is the correct approach for doing this within an Outlook add in?
Thanks for any help,
Matt
I managed to solve this with the following code in my button click event.
I subscribe to send clicked events and check each time if the MailItem contains the UserProperty “IsSecure”.