-
Notifications
You must be signed in to change notification settings - Fork 120
Images are not attached to the signature in the onMessageSend event in Outlook Online and the new Outlook #4716
Copy link
Copy link
Open
Labels
Area: OutlookIssue related to Outlook add-insIssue related to Outlook add-insStatus: in backlogIssue is being tracked in the backlog but timeline for resolution is unknownIssue is being tracked in the backlog but timeline for resolution is unknown
Description
Provide required information needed to triage your issue
We are listening to the "OnMessageSend" event in our Outlook addin. While the message is send, we are inserting the signature for the user. We realized that in Office Online (and in the new Outlook) inline images are missing in the received signature.
- When inserting the signature with another event like on "OnMessageNew" in Office Online the inline image is shown successfully.
- When using the classic Outlook App on Windows the signature insertion with inline images is also working sucessfully with the "OnMessageSend" event.
Your Environment
- Platform: Office on the web / new Outlook
- Host: Outlook
- Operating System: Windows 11
- Browser: Chrome
Expected behavior
Inline images in signatures shoud be shown to the mail recipient.
Current behavior
When inserting the Signature "OnMessageNew" the signature looks like this

When inserting the signature again with the "OnMessageSend" event the received signature looks like this

Link to live example(s)
Run following code when the "OnMessageSend" event is triggered.
function testOnSend() {
const signature = `<p>Greetings John Doe</p>
<img src="cid:homer.jpg" width="100" />`;
if (!Office.context.mailbox.item) {
return;
}
const item = Office.context.mailbox.item;
return new Promise(resolve => {
item.addFileAttachmentFromBase64Async(
imageBase64,
'homer.jpg',
{ isInline: true },
() => {
item.body.setSignatureAsync(
signature,
{
coercionType: Office.CoercionType.Html,
},
() => resolve(true),
);
},
);
});
}
await testOnSend();
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Area: OutlookIssue related to Outlook add-insIssue related to Outlook add-insStatus: in backlogIssue is being tracked in the backlog but timeline for resolution is unknownIssue is being tracked in the backlog but timeline for resolution is unknown