From df71a8b995e04f996c83d06a15b4536d9edd496a Mon Sep 17 00:00:00 2001 From: Eric Legault Date: Sun, 11 Feb 2024 14:40:25 -0600 Subject: [PATCH] Initial commit --- Samples/outlook-spam-reporting/README.md | 219 ++++++++++++++++++ .../assets/icon-128.png | Bin 0 -> 4693 bytes .../outlook-spam-reporting/assets/icon-16.png | Bin 0 -> 1596 bytes .../outlook-spam-reporting/assets/icon-32.png | Bin 0 -> 2386 bytes .../outlook-spam-reporting/assets/icon-64.png | Bin 0 -> 2112 bytes .../outlook-spam-reporting/assets/icon-80.png | Bin 0 -> 4836 bytes .../assets/logo-filled.png | Bin 0 -> 11915 bytes .../outlook-spam-post-processing-dialog.png | Bin 0 -> 7888 bytes .../readme/outlook-spam-processing-dialog.png | Bin 0 -> 12192 bytes .../readme/outlook-spam-ribbon-button.png | Bin 0 -> 4016 bytes Samples/outlook-spam-reporting/manifest.xml | 140 +++++++++++ .../src/commands/spamreporting.html | 15 ++ .../src/commands/spamreporting.js | 52 +++++ 13 files changed, 426 insertions(+) create mode 100644 Samples/outlook-spam-reporting/README.md create mode 100644 Samples/outlook-spam-reporting/assets/icon-128.png create mode 100644 Samples/outlook-spam-reporting/assets/icon-16.png create mode 100644 Samples/outlook-spam-reporting/assets/icon-32.png create mode 100644 Samples/outlook-spam-reporting/assets/icon-64.png create mode 100644 Samples/outlook-spam-reporting/assets/icon-80.png create mode 100644 Samples/outlook-spam-reporting/assets/logo-filled.png create mode 100644 Samples/outlook-spam-reporting/assets/readme/outlook-spam-post-processing-dialog.png create mode 100644 Samples/outlook-spam-reporting/assets/readme/outlook-spam-processing-dialog.png create mode 100644 Samples/outlook-spam-reporting/assets/readme/outlook-spam-ribbon-button.png create mode 100644 Samples/outlook-spam-reporting/manifest.xml create mode 100644 Samples/outlook-spam-reporting/src/commands/spamreporting.html create mode 100644 Samples/outlook-spam-reporting/src/commands/spamreporting.js diff --git a/Samples/outlook-spam-reporting/README.md b/Samples/outlook-spam-reporting/README.md new file mode 100644 index 000000000..4893aea5e --- /dev/null +++ b/Samples/outlook-spam-reporting/README.md @@ -0,0 +1,219 @@ +# Outlook Spam Reporting Add-in Sample + +[Spam Reporting dialog](/assets/readme/outlook-spam-processing-dialog.png) + +## Summary + +This sample showcases how to build a spam reporting solution that: + +- is easily discoverable in the Ribbon +- provides the user with a processing dialog for the email to be reported +- facilitate easily saving a copy of the email to a file that can be submitted to your back-end system + +> [!IMPORTANT] +> +> The integrated spam-reporting feature is currently in preview in Outlook on Windows. Features in preview shouldn't be used in production add-ins. We invite you to try out this feature in test or development environments and welcome feedback on your experience through GitHub (see the **Questions and feedback** section at the end of this page). + +## Prerequisites +- Microsoft 365 + +> Note: If you don't have a Microsoft 365 subscription, you can get a [free developer sandbox](https://developer.microsoft.com/microsoft-365/dev-program#Subscription) that provides a renewable 90-day Microsoft 365 E5 subscription for development purposes. + +- To preview the integrated spam-reporting feature in Outlook on Windows, you must install Version 2307 (Build 16626.10000) or later. Then, join the [Microsoft 365 Insider program](https://insider.microsoft365.com/join/Windows) and select the **Beta Channel** option to access Office beta builds. + +> [!TIP] +> If you're unable to choose a channel in your Outlook client, see [Let users choose which Microsoft 365 Insider channel to install on Windows devices](https://learn.microsoft.com/en-us/deployoffice/insider/deploy/user-choice?fbclid=IwAR3VzO4_HySIoNw735IZSRVBLQm_s83Cje4arT7kviE7HwaOoQYHPI0tF04). + +## Configure the sample + +> [!IMPORTANT] +> To test the `getAsFileAsync` method while it's still in preview in Outlook on Windows, you must configure your computer's registry. +> +> Outlook on Windows includes a local copy of the production and beta versions of Office.js instead of loading from the content delivery network (CDN). By default, the local production copy of the API is referenced. To reference the local beta copy of the API, you must configure your computer's registry as follows: +> +> 1. In the registry, navigate to `HKEY_CURRENT_USER\SOFTWARE\Microsoft\Office\16.0\Outlook\Options\WebExt\Developer`. If the key doesn't exist, create it. +> 1. Create an entry named `EnableBetaAPIsInJavaScript` and set its value to `1`. +> +> :::image type="content" source="../images/outlook-beta-registry-key.png" alt-text="The EnableBetaAPIsInJavaScript registry value is set to 1."::: + +Manifest Sample + +````xml + + + + + + + + + + + + + + + + + + + + + + +