I come with this information after two days of playing around with Outlook Desktop. Ticket.
- Calculation of the MIME signature
- QR code (seal) image attaching procedure
Research another approaches to attach QR code for Desktop version of Microsoft Outlook
A current approach is not suitable because it amends MIME structure on sender side (after MIME signature being calculated) and corrupts it in certain circumstances.
I would like to review pros and cons of the current approach and suggest two alternatives.
1. Current approach
Uses Office.Body.setAsync method of the Add-in API.
- Works with email composer and does not require interaction with the server.
- Works robust with Outlook Web (outlook.com)
Microsoft Documentation of the method directly states:
…The client may modify the value passed to
setAsyncin order to make it render efficiently with its rendering engine.
Applied to our workflow it means next:
setAsyncinvocation may amend original MIME, making signature being calculated on a previous step irrelevant. While working perfectly fine in Outlook Web, it’s impact on MIME in Desktop clients might be critical.
Bugs in SDK related to the
setAsyncand relevant functions.
[Outlook] Office.context.mailbox.item.body.setAsync breaks images for recipient (Outlook for Mac) · Issue #402 · OfficeDev/office-js · GitHub
office365 - Office.context.mailbox.item.body.setAsync removing original base64 from signatures - Stack Overflow
outlook add-in image & files - Stack Overflow
Outlook Addin API body.getAsync missing some styles on mac · Issue #149 · OfficeDev/office-js · GitHub
office js - Outlook add-in body setasync UI updates but result is blank - Stack Overflow
office js - setAsync returns success status but not inserting data in MAC installed outlook - Stack Overflow
Outlook Windows Desktop `appendOnSendAsync()` not appending to draft messages and stripping text. · Issue #1615 · OfficeDev/office-js · GitHub
2. Attaching QR code using EWS update operation
It’s stability and robustness pending research.
- It’s a remote request which in some cases requires going through our infrastructure. (Via so called
@sasha.ilieva mentioned that it does not work in combination with
3. Attaching QR code using Microsoft Graph API.
This approach allows directly amend draft.
Pros and cons pending research.
Having in mind stated above, I vote for research of the third option. My initial estimation of research, implementation and QA is two weeks.