Skip to content

Commit

Permalink
[Outlook] (spam reporting) Update README files and add sample.json fi…
Browse files Browse the repository at this point in the history
…le (#751)

* Update README files and add sample.json file

* Remove other supported platforms
  • Loading branch information
samantharamon authored Apr 10, 2024
1 parent 66ed39d commit 71629ce
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 13 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ All of the following samples show how to access and work with a user's Microsoft
| [Set your signature using Outlook event-based activation](Samples/outlook-set-signature) | Uses event-based activation to run an Outlook add-in when the user creates a new message or appointment.|
| [Verify the color categories of a message or appointment before it's sent using Smart Alerts](Samples/outlook-check-item-categories/) | Uses Outlook Smart Alerts to verify that required color categories are applied to a new message or appointment before it's sent.|
| [Verify the sensitivity label of a message](Samples/outlook-verify-sensitivity-label/) | Uses the sensitivity label API in an event-based add-in to verify and apply the **Highly Confidential** sensitivity label to applicable outgoing messages. |
| [Report spam or phishing emails in Outlook (preview)](Samples/outlook-spam-reporting/) | Builds an integrated spam-reporting add-in that's displayed in a prominent spot on the Outlook ribbon. |

## Excel

Expand Down Expand Up @@ -87,8 +88,8 @@ All of the following samples show how to access and work with a user's Microsoft

Check out these samples if you want to take advantage of the [shared runtime](https://learn.microsoft.com/office/dev/add-ins/develop/configure-your-add-in-to-use-a-shared-runtime) for your Office Add-in.

| Date | Name | Description |
| ------------------ | -------------- | ------------ |
| Name | Description |
| -------------- | ------------ |
| [Share global data with a shared runtime](Samples/excel-shared-runtime-global-state) | Shows how to set up a basic project that uses the shared runtime to run code for ribbon buttons, task pane, and custom functions in a single browser runtime. |
| [Manage ribbon and task pane UI, and run code on doc open](Samples/excel-shared-runtime-scenario) | Shows how to create contextual ribbon buttons that are enabled based on the state of your add-in. |

Expand Down
25 changes: 14 additions & 11 deletions Samples/outlook-spam-reporting/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ description: "Learn how to create an integrated spam-reporting add-in in Outlook

# Report spam or phishing emails in Outlook (preview)

**Applies to**: Outlook on Windows (preview)
**Applies to**: Outlook on Windows

![A sample spam-reporting dialog.](./assets/readme/outlook-spam-processing-dialog.png)

Expand All @@ -43,7 +43,9 @@ Outlook on Windows starting in Version 2307 (Build 16626.10000).
> If you don't have a Microsoft 365 subscription, you might qualify for a free developer subscription that's renewable for 90 days and comes configured with sample data. For details, see the [Microsoft 365 Developer Program FAQ](https://learn.microsoft.com/office/developer-program/microsoft-365-developer-program-faq#who-qualifies-for-a-microsoft-365-e5-developer-subscription-).
## Prerequisites

- Microsoft 365 subscription
- You must 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/deployoffice/insider/deploy/user-choice).
Expand All @@ -67,7 +69,7 @@ Run this sample in Outlook on Windows using one of the following add-in file hos
### Run the sample from GitHub

1. Download the **manifest.xml** file from this sample to a folder on your computer.
1. Sideload the add-in manifest in Outlook on Windows by following the manual instructions in [Sideload Outlook add-ins for testing](https://learn.microsoft.com/office/dev/add-ins/outlook/sideload-outlook-add-ins-for-testing?tabs=windows-web#sideload-manually).
1. Sideload the add-in manifest in Outlook on Windows by following the manual instructions in [Sideload Outlook add-ins for testing](https://learn.microsoft.com/office/dev/add-ins/outlook/sideload-outlook-add-ins-for-testing#sideload-manually).
1. Follow the steps in [Try it out](#try-it-out) to test the sample.

### Run the sample from localhost
Expand All @@ -80,29 +82,31 @@ If you prefer to host the web server for the sample on your computer, follow the
```console
npm install --global http-server
```

1. You need Office-Addin-dev-certs to generate self-signed certificates to run the local web server. If you haven't installed this yet, you can do this with the following command.

```console
npm install --global office-addin-dev-certs
```

1. Clone or download this sample to a folder on your computer, then go to that folder in a console or terminal window.
1. Run the following command to generate a self-signed certificate to use for the web server.

```console
npx office-addin-dev-certs install
```

This command will display the folder location where it generated the certificate files.

1. Go to the folder location where the certificate files were generated, then copy the **localhost.crt** and **localhost.key** files to the cloned or downloaded sample folder.
1. Run the following command.

```console
http-server -S -C localhost.crt -K localhost.key --cors . -p 3000
```

The http-server will run and host the current folder's files on localhost:3000.

1. Now that your localhost web server is running, you can sideload the **manifest-localhost.xml** file provided in the sample folder. To sideload the manifest, follow the manual instructions in [Sideload Outlook add-ins for testing](https://learn.microsoft.com/office/dev/add-ins/outlook/sideload-outlook-add-ins-for-testing?tabs=windows-web#sideload-manually).
1. Follow the steps in [Try it out](#try-it-out) to test the sample.

Expand All @@ -120,7 +124,7 @@ Once the add-in is loaded in Outlook, use the following steps to try out its fun

## References

- [Implement an integrated spam-reporting add-in](https://learn.microsoft.com/en-us/office/dev/add-ins/outlook/spam-reporting)
- [Implement an integrated spam-reporting add-in](https://learn.microsoft.com/office/dev/add-ins/outlook/spam-reporting)
- [ReportPhishingCommandSurface Extension Point](https://learn.microsoft.com/javascript/api/manifest/extensionpoint?view=outlook-js-preview&preserve-view=true#reportphishingcommandsurface-preview)
- [Office.MessageRead.getAsFileAsync() method](https://learn.microsoft.com/javascript/api/outlook/office.messageread?view=outlook-js-preview&preserve-view=true#outlook-office-messageread-getasfileasync-member(1))
- [Troubleshoot event-based and spam-reporting add-ins](https://learn.microsoft.com/office/dev/add-ins/outlook/troubleshoot-event-based-and-spam-reporting-add-ins)
Expand All @@ -144,9 +148,6 @@ Copyright (c) 2024 Microsoft Corporation. All rights reserved.

This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information, see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [[email protected]](mailto:[email protected]) with any additional questions or comments.

<img src="https://pnptelemetry.azurewebsites.net/pnp-officeaddins/samples/outlook-spam-reporting" />Run this sample in Outlook on Windows using one of the following add-in file hosting options.
Run this sample in Outlook on Windows using one of the following add-in file hosting options.

## Solution

| Solution | Author(s) |
Expand All @@ -157,4 +158,6 @@ Run this sample in Outlook on Windows using one of the following add-in file hos

| Version | Date | Comments |
| ----- | ----- | ----- |
| 1.0 | March 26, 2024 | Initial release |
| 1.0 | March 26, 2024 | Initial release |

<img src="https://pnptelemetry.azurewebsites.net/pnp-officeaddins/samples/outlook-spam-reporting" />
46 changes: 46 additions & 0 deletions Samples/outlook-spam-reporting/assets/sample.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
[
{
"name": "outlook-spam-reporting",
"reponame": "office-add-in-samples",
"source": "officedev",
"title": "Report spam or phishing emails in Outlook (preview)",
"shortDescription": "Build an integrated spam-reporting add-in that's displayed in a prominent spot on the Outlook ribbon.",
"url": "https://github.com/OfficeDev/Office-Add-in-samples/tree/main/Samples/outlook-spam-reporting",
"longDescription": [
"Builds an integrated spam-reporting add-in that's displayed in a prominent spot on the Outlook ribbon."
],
"creationDateTime": "2024-03-26",
"updateDateTime": "2024-04-05",
"products": [
"Office"
],
"metadata": [
{
"key": "CLIENT-SIDE-DEV",
"value": "JavaScript"
}
],
"thumbnails": [
{
"type": "Image",
"order": 100,
"url": "https://raw.githubusercontent.com/OfficeDev/Office-Add-in-samples/main/Samples/outlook-spam-reporting/assets/readme/outlook-spam-processing-dialog.png",
"alt": "A sample spam-reporting dialog."
}
],
"authors": [
{
"gitHubAccount": "microsoft",
"pictureUrl": "https://github.com/microsoft.png",
"name": "Microsoft"
}
],
"references": [
{
"name": "Implement an integrated spam-reporting add-in (preview)",
"description": "Learn how to implement an integrated spam-reporting add-in in Outlook.",
"url": "https://learn.microsoft.com/office/dev/add-ins/outlook/spam-reporting"
}
]
}
]

0 comments on commit 71629ce

Please sign in to comment.