Blog

Bug - Sending email messages with the Office365Outlook connector that includes SharePoint file attachments no longer works

If you want to use the Office365Outlook connector to send email messages with file attachments from SharePoint, it's useful to note that this no longer works following a recent update to Power Apps.

Until recently, it was possible to send emails with file attachments from SharePoint using the Office365Outlook connector. Following a recent update (in May 2021), this is no longer possible.

Taking the example of a SharePoint list item with one or more file attachments, if we add a card to a form and add a button with the following formula, the result today is that the email will send, but will not include the file attachment(s).

Office365Outlook.SendEmailV2(
      "recipient@emailaddress.com",
      "Message subject",
      "Message body",
      {Attachtments: RenameColumns(
                     ThisItem.Attachments,
                     "Value",
                     "ContentBytes",
                     "DisplayName",
                     "Name"
        )
    }
)

Note that the Mail connector still works and still sends the attachments successfully. Therefore, it appears that this is a problem that affects the Office365Outlook connector.

Mail.SendEmailV3("tim@email.com", 
                 "Enter the email title here",
                 "Enter your email message here",
                 false,
                 {
                    files:First(ThisItem.Attachments).Value,
                    filenames:First(ThisItem.Attachments).DisplayName
                 }
)
Since SharePoint is a highly popular data source for storing files, and the ability to send file attachments plays a key role in many business apps, I hope that this is something that Microsoft will fix.

I've added a post in the ideas forum, and I would encourage anyone who values this feature to vote for the idea beneath.
https://powerusers.microsoft.com/t5/Power-Apps-Ideas/Fix-bug-Sending-email-messages-with-the-Office365Outlook/idi-p/925808#M33655