As promised, I have created a GitHub repository for the sample I blogged about earlier. Here is the repository:
This includes three items of interest:
- The OnSend event, implemented in the simplest of ways to demonstrate bare bones how to get it to work.
- The displayDialogAsync with the inline frame (displayInFrame) option. I will blog about this in the future as well.
- A project build by Yo Office and published per my blog post here.
What this sample add-in does is pops up a dialog box anytime you press Send on an email with a question: “Are you sure?” If you click Yes, it sends, if you click “no” is blocks the send. Here is what that dialog looks like:
If you have followed the steps from my Yo Office post, you will be able to open the project in VS Code, and from the terminal, launch it with:
npm start
Next, you will need to follow the steps to enable the OnSend policy in your account and then you will need to install/sideload the manifest. From there you will not see any appearance of the add-in at all, until you press the Send button.
NOTE: At the point I first tested it on June, 13th, 2017, there is a KNOWN ISSUE with the certificates created fro a “yo office” build. If you have not resolved the certificates issue you will be able to start the project in Node.js, but the add-in will fail to run. You need to perform the steps outlined here to correct it:
