Smart alerts: Add handling for Send anyway and don't send buttons
Many add-ins have migrated to using the new smart alerts feature, primarily because it offers a non-blocking experience for users when an add-in encounters an issue.
However, this migration has introduced a significant limitation: Smart alerts do not provide the same level of control that traditional dialog-based flows did, especially in scenarios where the add-in needs to know whether an email was sent or not. In the previous model, add-ins could handle "Send" or "Don't Send" actions explicitly, but smart alerts currently offer no event hooks for these actions.
This poses a challenge for add-ins that depend on tracking whether a message was actually sent, as there is no reliable way to determine the outcome of the user’s decision.
Suggested improvements (Implement one of these):
1. Add event handling for “Send Anyway” and “Don’t Send” buttons
Introduce the ability for add-ins to register a callback function that is triggered after a user clicks either the Send Anyway or Don’t Send button. This callback should not allow UI interaction (e.g. showing dialogs or alerts) but should give the add-in a chance to log or process the outcome silently.
2. Allow send mode override from prompt user to soft block
Allow the add-ins to switch the send mode from prompt user to soft block (Currently only the opposite is possible). In this model:
- If the add-in is unreachable, the user is not blocked and can proceed.
- If the add-in is reachable, it can control the send operation (leveraging the existing taskpane-based send flow).