Skip to content

Commit 0e28e54

Browse files
[Outlook] (Smart Alerts) Document dialog improvements (#4935)
* Draft Smart Alerts improvements * Apply feedback from review * Fix ms.date * Remove TODO statements * Add screenshots and remove preview notes * Reword * Apply suggestion from review Co-authored-by: Elizabeth Samuel <[email protected]> --------- Co-authored-by: Elizabeth Samuel <[email protected]>
1 parent 479dec6 commit 0e28e54

7 files changed

+112
-30
lines changed
16.4 KB
Loading
13.3 KB
Loading

Diff for: docs/images/outlook-smart-alerts-dont-send.png

3.85 KB
Loading

Diff for: docs/images/outlook-smart-alerts-take-action.png

10.4 KB
Loading

Diff for: docs/images/outlook-win-smart-alerts-take-action.png

13.8 KB
Loading

Diff for: docs/outlook/onmessagesend-onappointmentsend-events.md

+10-9
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Handle OnMessageSend and OnAppointmentSend events in your Outlook add-in with Smart Alerts
33
description: Learn about the Smart Alerts implementation and how it handles the OnMessageSend and OnAppointmentSend events in your event-based Outlook add-in.
4-
ms.date: 02/13/2025
4+
ms.date: 03/11/2025
55
ms.topic: concept-article
66
ms.localizationpriority: medium
77
---
@@ -30,7 +30,13 @@ The following table lists supported client-server combinations for the Smart Ale
3030

3131
## Try out Smart Alerts in an event-based add-in
3232

33-
To see Smart Alerts in action, try out the [walkthrough](smart-alerts-onmessagesend-walkthrough.md). You'll create an add-in that checks whether a document or picture is attached to a message before it's sent.
33+
To see Smart Alerts in action, try out the [walkthrough](smart-alerts-onmessagesend-walkthrough.md). You'll create an add-in that checks whether a document or picture is attached to a message before it's sent. In addition to implementing a basic Smart Alerts add-in, you'll also learn about the following functionalities to further enhance the user experience of your add-in.
34+
35+
- [Customize the Smart Alerts dialog message using Markdown](smart-alerts-onmessagesend-walkthrough.md#implement-event-handling)
36+
- [Customize the text of a dialog button](smart-alerts-onmessagesend-walkthrough.md#customize-the-text-and-functionality-of-a-button-in-the-dialog-optional)
37+
- [Open a task pane or run a function from the dialog](smart-alerts-onmessagesend-walkthrough.md#customize-the-text-and-functionality-of-a-button-in-the-dialog-optional)
38+
- [Override the send mode option at runtime](smart-alerts-onmessagesend-walkthrough.md#override-the-send-mode-option-at-runtime-optional)
39+
- [Programmatically send the mail item once it meets your add-in's conditions](smart-alerts-onmessagesend-walkthrough.md#programmatically-send-the-item-from-the-task-pane-optional)
3440

3541
## Smart Alerts feature behavior and scenarios
3642

@@ -222,18 +228,13 @@ Because the `OnMessageSend` and `OnAppointmentSend` events are supported through
222228

223229
In addition to these constraints, only one instance each of the `OnMessageSend` and `OnAppointmentSend` event can be declared in the manifest. If you require multiple `OnMessageSend` or `OnAppointmentSend` events, you must declare each one in a separate add-in.
224230

225-
The Smart Alerts dialog message must be 500 characters or less. While you can change the dialog message and **Don't Send** button to suit your add-in scenario, the following can't be customized.
231+
The Smart Alerts dialog message must be 500 characters or less. While you can change the message and certain aspects of a button in the Smart Alerts dialog, the following can't be customized.
226232

227233
- The dialog's title bar. Your add-in's name is always displayed there.
228234
- The font or color of the dialog message. However, you can use Markdown to format certain elements of your message. For a list of supported elements, see [Limitations to formatting the dialog message using Markdown](#limitations-to-formatting-the-dialog-message-using-markdown).
229235
- The icon next to the dialog message.
230236
- Dialogs that provide information on event processing and progress. For example, the text and options that appear in the timeout and long-running operation dialogs can't be changed.
231237

232-
You can customize the **Don't Send** button in the dialog to open a task pane or run a function. For guidance on the types of add-in commands, see [Types of add-in commands](../design/add-in-commands.md#types-of-add-in-commands).
233-
234-
> [!NOTE]
235-
> Support to customize the **Don't Send** button was introduced in [Mailbox requirement set 1.14](/javascript/api/requirement-sets/outlook/requirement-set-1.14/outlook-requirement-set-1.14).
236-
237238
In Outlook on the web and in new Outlook on Windows:
238239

239240
- The `OnAppointmentSend` event only occurs when the meeting being sent was created through the **New Event** option. If the meeting being sent was created by selecting a date and time directly from the calendar, the `OnAppointmentSend` event doesn't occur.
@@ -316,7 +317,7 @@ You can use Markdown to format the message of a Smart Alerts dialog. However, on
316317
The Smart Alerts feature ensures that all outgoing mail items are compliant with the information protection policies of an organization and helps users improve their messages through recommendations. To ensure your add-in always provides users with a smooth and efficient sending experience, observe the following guidelines.
317318
318319
- **Don't let your add-in further delay the send operation**. Smart Alerts add-ins must be short-running and lightweight. Avoid overloading the `OnMessageSend` and `OnAppointmentSend` event handlers with heavy validations. To prevent this, preprocess information when other events occur, such as the `OnMessageRecipientsChanged` or `OnMessageAttachmentsChanged` event. To determine which events your add-in can respond to, see the "Supported events" section of [Configure your Outlook add-in for event-based activation](autolaunch.md#supported-events).
319-
- **Don't implement additional dialogs**. Prevent overwhelming your users with too many dialogs. Instead, customize the text in the Smart Alerts dialog to convey information. If needed, you can also [customize the **Don't Send** button](smart-alerts-onmessagesend-walkthrough.md#customize-the-dont-send-button-optional) to provide users with additional information and functionality through a task pane or function.
320+
- **Don't implement additional dialogs**. Prevent overwhelming your users with too many dialogs. Instead, customize the text in the Smart Alerts dialog to convey information. If needed, you can also [customize the text and functionality of certain dialog buttons](smart-alerts-onmessagesend-walkthrough.md#customize-the-text-and-functionality-of-a-button-in-the-dialog-optional) to provide users with additional information and functionality through a task pane or function.
320321
- **Enable the appropriate Group Policy settings in your organization**. To ensure that your Smart Alerts add-in activates on each mail item, including those sent using applications that implement Simple MAPI, configure the **Running Outlook for Simple MAPI Sending** setting. To learn more about this setting, see [Activate Smart Alerts in applications that use Simple MAPI](#activate-smart-alerts-in-applications-that-use-simple-mapi).
321322
322323
## Debug your add-in

0 commit comments

Comments
 (0)