I have an Outlook add-in created for sending large file attachments. When a user tries to attach a file it actually attaches a placeholder ".txt" file whose contents are the path to the actual attachment. When the user sends the email the add-in tries to read the contents of the placeholder attachment in order to get the path to the actual attachment. It does this using the Attachment.PropertyAccessor.GetProperty
method while passing in the value "http://schemas.microsoft.com/mapi/proptag/0x37010102"
(PR_ATTACH_DATA_BIN).
byte[] attachmentData = attachment.PropertyAccessor.GetProperty(
"http://schemas.microsoft.com/mapi/proptag/0x37010102");
This has been working for several years and I haven't updated my add-in for 4 months but it has been acting differently starting today. Now the return value for this method returns a byte array of the correct length (in my case 93 for the 93-byte placeholder file) but all of the items in the byte array are 0. If I open the placeholder file all of the contents look correct so I don't understand the issue. We are currently on the latest build of Outlook 2016 (Version 1711 Build 8730.2127) and I've even tried reverting to the last 2 builds but the problem still occurs.
Does anyone know if something has changed with Outlook 2016 regarding the MAPI?
Note - I've tried using OutlookSpy to find out what's going on but the GetAttachmentTable
tab shows no entries even though from the Outlook UI I can clearly see that there is an attachment.