Skip to content

Outlook Add-in w/ OnMessageSend - There was a problem sending this message because one or more attachments failed to upload. Please try again #6780

Description

@zacccypoo

Your Environment

  • Platform [PC desktop, Mac, iOS, Office on the web]: PC Desktop
  • Host [Excel, Word, PowerPoint, etc.]: Outlook
  • Office version number: 20260529014.16
  • Operating System: Windows
  • Browser (if using Office on the web): N/A

Expected behavior

An email should send using the native send without error

Current behavior

Customer using our Outlook Add-in that includes OnMessageSend in the manifest is consistently seeing emails fail to send, leaving the item stuck in the drafts folder.

After ~2 minutes a popup says "Couldn't Send this Message". Upon clicking more details the banner says

There was a problem sending this message because one or more attachments failed to upload. Please try again

The email has no attachments

Seems to be the exact same issue as #6708 (comment) however I was asked to make a separate ticket

The Email fails to send with the following errors

Image Image

Steps to reproduce

  1. Email with a long thread
  2. User replies to email with basic, short text response
  3. User presses the native send button
  4. Item changes to have state [QUEUED]
  5. Item remains in [QUEUED] for about a minute or so
  6. Dialog appears with failed message notice
  7. Item remains in the draft folders with status [DRAFT]

Link to live example(s)

N/A

Context

Customers are pissed because they dont realize that their emails dont send and are stuck in the draft folder

Useful logs

I followed these instructions https://github.com/OfficeDev/office-js/wiki/Collecting-log-files-for-Outlook-Add%E2%80%90ins-issues#new-outlook-on-windows

Here is the Diagnostic code - 7drFBA
And another customer's rWd7fA

I have downloaded a HAR file to share please provide instructions if you have any of how to do so securely.

Screenshots from the network tab

I tried to look at things that seemed suspicious from the network tab.

GetComplianceConfiguration took 1.5minutes and then failed without a response
Image

There was a 403 on admin.microsoft.com/centrohost

Image

Observations

  • The thread was very long but there were no attachments
  • There were however images in the signatures from recipients. These images, were all whited out, as if they failed to render, possibly due to IT Security Policies I am not sure..
  • The email is sent successfully from the Outlook Web Client (chrome)`
  • The email is sent successfully from Outlook Desktop when the recipients are internal
    • Our add-in OnMessageSend behaves differently for internal vs external. For external:
      • Adds a tracking <img /> pixel to at the top of the body
      • Replace all links in the thread with a custom tracking link by iterating over the anchor tags and calling setAttribute('href', newUrl)
      • Finally calls Office.context.mailbox.item.body.setAsync with the altered body with coercionType: Office.CoercionType.Html
      • Adds a custom email header via Office.context.mailbox.item.internetHeaders.setAsync
      • Note: everything is wrapped in try/catch and we are not seeing any failures during these OfficeJS calls. It appears as if our OnMessageSend successfully completes

Metadata

Metadata

Assignees

Labels

Area: OutlookIssue related to Outlook add-ins

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions