Share via

Why the add-in no longer has access to the sent item for further processing or modification

Mofaruf Essoua 20 Reputation points
2026-04-15T02:37:08.2+00:00

I have created Outlook add-in using Office.js and noticed that after the ItemSend event completes, the add-in no longer has access to the sent item for further processing or modification. This limits scenarios like post-send tagging, content updates, or metadata injection.

Is this a design limitation ?

Microsoft 365 and Office | Development | Office JavaScript API
0 comments No comments

Answer accepted by question author

Steven-N 25,305 Reputation points Microsoft External Staff Moderator
2026-04-15T04:21:04+00:00

Hi Mofaruf Essoua

Yes, this is the know behavior, as states in this document, with the Outlook on-send model (the ItemSend event), the add-in runs only as a pre-send validation/modification hook. After your handler calls event.completed() and the send proceeds, Outlook ends that on-send execution context, and the compose item is expected to close automatically.

As a result, the add-in does not have a supported way to keep accessing or modifying the same sent item “after send” from the ItemSend runtime.User's image

In this context, Microsoft recommends Smart Alerts (OnMessageSend / OnAppointmentSend) as the modern approach to validate messages at send time and offers more flexible send behaviors compared to the legacy on-send feature. This still operates at send time (not post-send editing), but it’s the preferred model on supported clients.

Hope my answer will help you.


If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".   

Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

Was this answer helpful?

0 comments No comments

1 additional answer

Sort by: Most helpful
  1. AI answer

    2026-04-15T02:37:17.9866667+00:00

    Yes, this is a design limitation of the current on-send (ItemSend) model for Outlook add-ins.

    The on-send feature is implemented as an event that runs while the item is being sent. The add-in code is invoked via the ItemSend event, can inspect and modify the item (for example using Office.context.mailbox.item and methods like body.getAsync / body.setAsync), and then must call event.completed to either allow or block the send. Once the event completes and the send operation proceeds, the on-send add-in’s execution context ends and it no longer has access to that item instance for further processing.

    The documentation explicitly positions on-send as a pre-send validation/modification point, not a post-send processing pipeline. It also notes that closing the item should happen automatically after the event is completed and does not describe any supported pattern for continuing to work with the sent item after the send completes. Scenarios such as post-send tagging, content updates, or metadata injection on the already-sent item are therefore not supported by the on-send feature.

    For scenarios that require richer send-time behavior (such as Smart Alerts with different send modes), the newer Smart Alerts model (OnMessageSend / OnAppointmentSend) still operates around the send event itself, not post-send modification of the final stored item.


    References:

    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.