|
1 | 1 | ---
|
2 | 2 | title: Handle OnMessageSend and OnAppointmentSend events in your Outlook add-in with Smart Alerts
|
3 | 3 | 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 |
5 | 5 | ms.topic: concept-article
|
6 | 6 | ms.localizationpriority: medium
|
7 | 7 | ---
|
@@ -30,7 +30,13 @@ The following table lists supported client-server combinations for the Smart Ale
|
30 | 30 |
|
31 | 31 | ## Try out Smart Alerts in an event-based add-in
|
32 | 32 |
|
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) |
34 | 40 |
|
35 | 41 | ## Smart Alerts feature behavior and scenarios
|
36 | 42 |
|
@@ -222,18 +228,13 @@ Because the `OnMessageSend` and `OnAppointmentSend` events are supported through
|
222 | 228 |
|
223 | 229 | 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.
|
224 | 230 |
|
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. |
226 | 232 |
|
227 | 233 | - The dialog's title bar. Your add-in's name is always displayed there.
|
228 | 234 | - 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).
|
229 | 235 | - The icon next to the dialog message.
|
230 | 236 | - 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.
|
231 | 237 |
|
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 |
| -
|
237 | 238 | In Outlook on the web and in new Outlook on Windows:
|
238 | 239 |
|
239 | 240 | - 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
|
316 | 317 | 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.
|
317 | 318 |
|
318 | 319 | - **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. |
320 | 321 | - **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).
|
321 | 322 |
|
322 | 323 | ## Debug your add-in
|
|
0 commit comments