Skip to content

[Outlook] (Smart Alerts) Update item-switch behavior in Outlook on the web and new Outlook on Windows #5214

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file removed docs/images/outlook-item-switch-block.png
Binary file not shown.
Binary file removed docs/images/outlook-item-switch-prompt-user.png
Binary file not shown.
Binary file added docs/images/outlook-item-switch-web-block.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/outlook-item-switch-win32-block.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
33 changes: 21 additions & 12 deletions docs/outlook/onmessagesend-onappointmentsend-events.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Handle OnMessageSend and OnAppointmentSend events in your Outlook add-in with Smart Alerts
description: Learn about the Smart Alerts implementation and how it handles the OnMessageSend and OnAppointmentSend events in your event-based Outlook add-in.
ms.date: 06/05/2025
ms.date: 06/10/2025
ms.topic: concept-article
ms.localizationpriority: medium
---
Expand Down Expand Up @@ -225,33 +225,42 @@ If the Smart Alerts add-in implements the **prompt user** option, it doesn't pro

When a user navigates away from the message they're sending (for example, to read a message in their inbox), the behavior of a Smart Alerts add-in differs between Outlook clients. Select the tab for the Outlook client on which the add-in is running.

# [Web/Windows (new)](#tab/web-new-windows)

In Outlook on the web or in [new Outlook on Windows](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627), a user must remain on the message being sent until the Smart Alerts add-in completes processing it. Otherwise, once the user navigates away from the item, the add-in terminates the Smart Alerts operation and saves a draft to the mailbox's **Drafts** folder. The user is then alerted that they must resend the message from the **Drafts** folder and remain on the message until the add-in completes processing it.

:::image type="content" source="../images/outlook-smart-alerts-item-switch-dialog-web.png" alt-text="The dialog shown to the user in Outlook on the web or new Outlook on Windows when they navigate away from a message after selecting Send.":::

# [Windows (classic)](#tab/windows)
# [Web / Windows](#tab/web-new-windows+windows)

#### Message composed in a window

Starting in Version 2402 (Build 17310.10000), if a message is being composed in a separate window, such as a new message, and a user navigates away from it after they select **Send**, the Smart Alerts add-in will continue to process the message in the background. If additional actions are needed before the message can be sent, the appropriate Smart Alerts dialog is shown to the user (see [Available send mode options](#available-send-mode-options)).
> [!NOTE]
> In classic Outlook on Windows, the behavior described in this section applies to Version 2402 (Build 17310.10000) and later.

If a message is being composed in a separate window, such as a new message, and a user navigates away from it after they select **Send**, the Smart Alerts add-in will continue to process the message in the background. If additional actions are needed before the message can be sent, the appropriate Smart Alerts dialog is shown to the user (see [Available send mode options](#available-send-mode-options)).

#### Message composed in the Reading Pane

Starting in Version 2402 (Build 17310.10000), if a reply, forward, or existing draft is being composed in the Outlook Reading Pane, and a user navigates away from it after they select **Send**, a dialog with options is shown to the user. The options available depend on the [send mode option](#available-send-mode-options) implemented by the add-in.
If a reply, forward, or existing draft is being composed in the Outlook Reading Pane, and a user navigates away from it after they select **Send**, a dialog with options is shown to the user. The options available depend on the [send mode option](#available-send-mode-options) implemented by the add-in.

If the [prompt user](#prompt-user) send mode option is implemented, the following options are shown.

- **Wait**: This option opens the message being composed in a new window, so that the Smart Alerts add-in can continue to process it. If the user navigates away from the newly opened window during processing, the add-in will continue to process the message in the background (to learn more, see [Message composed in a window](#message-composed-in-a-window)). If additional actions are needed before a message can be sent, the appropriate Smart Alerts dialog is shown to the user.
- **Send Anyway**: This option terminates the add-in operation and sends the message.

> [!IMPORTANT]
> In Outlook on the web and new Outlook on Windows, the **Send Anyway** option may not appear in the item-switch dialog even if the add-in currently running implements the **prompt user** send mode option. This is because the **Send Anyway** option is shown only if all installed Smart Alerts add-ins implement the **prompt user** send mode option. Otherwise, only the **Wait** and **Save as Draft** options are shown. This helps provide a more secure experience since multiple Smart Alerts add-ins can launch in any order (for more information on this behavior, see [Event-based activation behavior and limitations](autolaunch.md#event-based-activation-behavior-and-limitations)).

- **Save as Draft**: This option terminates the add-in and send operations and saves a draft of the message to the mailbox's **Drafts** folder.

:::image type="content" source="../images/outlook-item-switch-prompt-user.png" alt-text="The dialog shown when a user navigates away from a message being processed by a Smart Alerts add-in that implements the prompt user send mode option.":::
**Item-switch dialog in Outlook on the web and new Outlook on Windows**
:::image type="content" source="../images/outlook-item-switch-web-prompt-user.png" alt-text="The dialog shown in Outlook on the web and new Outlook on Windows when a user navigates away from a message being processed by a Smart Alerts add-in that implements the prompt user send mode option.":::

**Item-switch dialog in classic Outlook on Windows**
:::image type="content" source="../images/outlook-item-switch-win32-prompt-user.png" alt-text="The dialog shown in classic Outlook on Windows when a user navigates away from a message being processed by a Smart Alerts add-in that implements the prompt user send mode option.":::

If the [soft block](#soft-block) or [block](#block) send mode option is implemented, only the **Wait** and **Save as Draft** options are shown.

:::image type="content" source="../images/outlook-item-switch-block.png" alt-text="The dialog shown when a user navigates away from a message being processed by a Smart Alerts add-in that implements the soft block or block send mode option.":::
**Item-switch dialog in Outlook on the web and new Outlook on Windows**
:::image type="content" source="../images/outlook-item-switch-web-block.png" alt-text="The dialog shown in Outlook on the web and new Outlook on Windows when a user navigates away from a message being processed by a Smart Alerts add-in that implements the soft block or block send mode option.":::

**Item-switch dialog in classic Outlook on Windows**
:::image type="content" source="../images/outlook-item-switch-win32-block.png" alt-text="The dialog shown in classic Outlook on Windows when a user navigates away from a message being processed by a Smart Alerts add-in that implements the soft block or block send mode option.":::

# [Mac](#tab/mac)

Expand Down