Skip to content

Get email attachment that is itself an email #1428

@JacoSJKruger

Description

@JacoSJKruger

In the new version when an email has an attachment, but that attachment is itself an email, then this is handled as an 'Item'.

It does not have the standard properties like ContentBytes and ContentId.
I would however like to download this file/item programatically but things like $emailAttachment->getContentBytes(); do not work.

I've also tried getting creative like:

$fileContents = $graphServiceClient->users()->byUserId($user_id)->messages()->byMessageId($email->getId())->attachments()->byAttachmentId($emailAttachment->getId())->content()->get()->wait();

But alas, still not working.
Any ideas?

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionCustomer is asking for a clarification, use case or an information. Use it for Issues of type Questi

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions