Open Side Menu
Skip to contentMicrosoft Community Hub
Tech CommunityCommunity Hubs
Products
Topics
Blogs
Events
Skills Hub
Community
RegisterSign In
  1. Microsoft Community Hub
  2. CommunitiesProducts
  3. Microsoft 365
  4. Microsoft 365 Developer Platform
Berend Engelbrecht's avatar
Berend Engelbrecht
Brass Contributor
Apr 09, 2025
Status:
New

Implement Office.context.mailbox.item.getAsFileAsync for draft messages

We have a requirement in an Office.js add-in to do the following: Automatically send a message Save the sent message The functionality was previously implemented using EWS and Office.context.mai...
Office Add-ins deployment
Office Add-ins development
Office Add-ins UX
bondo's avatar
bondo
Copper Contributor
Nov 27, 2026

 

Same need from an add-in that archives mail to a document/project system.

 

We file a user's replies in the project their thread belongs to. Today that only works after the user opens the sent copy in Sent Items, because getAsFileAsync is read mode only and there is no event after send. With getAsFileAsync in compose (for example inside OnMessageSend, or right before sendAsync) the add-in could file the exact MIME of the reply at send time, inline images as cid: parts, without Graph or EWS.

 

One detail that matters for this: please return the internetMessageId that the message will carry when it is sent, or document whether it can change at send. Several issues report a change between draft and sent; two (#2659, #1244) carry a product-bug label, but Microsoft has not confirmed the cause or fixed it (in #1244 it could not reproduce it). Is that expected?

- office-js #6066 (classic Outlook on Windows): https://github.com/OfficeDev/office-js/issues/6066

- office-js #2659 (classic Outlook on Windows): https://github.com/OfficeDev/office-js/issues/2659

- office-js #1244 (Outlook on Mac): https://github.com/OfficeDev/office-js/issues/1244

 

The event after send that this pairs with is requested in the idea "Outlook add-ins: event after a message is sent, with the sent item's internetMessageId and itemId":

- https://techcommunity.microsoft.com/idea/microsoft365developerplatform/outlook-add-ins-event-after-a-message-is-sent-with-the-sent-items-internetmessag/4577403

 

Related: the request to get the Message-ID of a sent message, the idea "Retrieve RFC message ID after sending the email" and office-js #5528:

- https://techcommunity.microsoft.com/idea/microsoft365developerplatform/retrieve-rfc-message-id-after-sending-the-email/4410862

- https://github.com/OfficeDev/office-js/issues/5528

 

(Drafted with the help of an AI assistant.)

Share this page

  • LinkedIn
  • Facebook
  • X
  • Reddit
  • Bluesky
  • RSS
  • Email
What's new
  • Surface Laptop Ultra
  • Surface Pro
  • Surface Laptop
  • Surface RTX Spark Dev Box
  • Explore Copilot
  • Explore Microsoft products
  • Windows 11 apps
Microsoft Store
  • Account profile
  • Download Center
  • Microsoft Store support
  • Returns
  • Order tracking
  • Certified Refurbished
  • Flexible Payments
Education
  • Microsoft in education
  • Devices for education
  • Microsoft Teams for Education
  • Microsoft 365 Education
  • How to buy for your school
  • Educator training and development
  • Deals for students and parents
  • AI for education
Business
  • Microsoft AI
  • Microsoft Security
  • Dynamics 365
  • Microsoft 365
  • Microsoft Power Platform
  • Microsoft Teams
  • Microsoft Copilot
  • Small Business
Developer & IT
  • Azure
  • Microsoft Developer
  • Microsoft Learn
  • Support for AI marketplace apps
  • Microsoft Tech Community
  • Microsoft Marketplace
  • Software companies
  • Visual Studio
Company
  • Careers
  • About Microsoft
  • Company news
  • Privacy at Microsoft
  • Investors
  • Diversity and inclusion
  • Accessibility
  • Sustainability
California Consumer Privacy Act (CCPA) Opt-Out IconYour Privacy ChoicesConsumer Health Privacy
  • Sitemap
  • Contact Microsoft
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Safety & eco
  • Recycling
  • About our ads
  • © Microsoft
Share this pageShare on LinkedInShare on FacebookShare on XShare on RedditShare on BlueskySubscribe via RSSShare via email