2

I'm working with the v2.0 messages api to retrieve messages from an Office365 or Outlook email accounts.

When retrieving messages with attachments, the HasAttachments flag is set to true so I know to retrieve attachment(s) for the message.

One issue I'm seeing is when there is an embedded image but no attachment, the HasAttachments flag is set to false.

/api/v2.0/me/messages/{messageid}

I didn't see any other attributes in the message JSON data that would specify if a message has embedded images...

But, if I call the get attachment API I can retrieve the embedded images even if the HasAttachments flag is set to false.

/api/v2.0/me/messages/{messageID}/attachments

Is there a flag that I should be checking to know if I need to retrieve attachments/parts that are embedded, or should the HasAttachments flag be true in the case of only embedded images/objects and no attachments?

For now I'm simply retrieving attachments for every message processed. If there really are no attachments or embedded objects it just returns an empty list which works fine.

But if there is a flag telling me if there is an attachment and/or embedded objects that would make things quicker and require less API calls.

Thanks!

bvstone
  • 587
  • 2
  • 6
  • 17

0 Answers0