Skip to content

Get attachment from multipart/signed attachments #1587

Closed
@SandraCHC

Description

@SandraCHC

When a message is signed, I receive a smime.p7m file as an attachment. When I display the content, I see several file attachments with the file name and the Base64 content.

I receive my file attachments with

$attachments = $graphServiceClient->users()->byUserId($address)->messages()->byMessageId($messageId)->attachments()->get()->wait();
foreach ($attachments->getValue() as $attachment) {
    $data = \base64_decode($attachment->getBackingStore()->get('contentBytes'));
    ...
}

But how do I read the file attachments if they are in a smime.p7m? Is there a function for this?

I have found this issue (#980), but I don't understand how I can implement this with PHP.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions