dcblogdev / laravel-microsoft-graph

Laravel package for Microsoft Graph API (Microsoft365)
https://dcblog.dev/docs/laravel-microsoft-graph
Other
120 stars 51 forks source link

Moving emails in a sharedmailbox #53

Closed MilesHart closed 1 year ago

MilesHart commented 1 year ago

I want to move emails (by ID) from the inbox to a another foler in the same mailbox.

Does anyone have any pointers for this?

Much appreciated.

dcblogdev commented 1 year ago

You can do this by using MsGraph::post("me/messages/$id/move", ['destinationId' => $folderId]);

see https://learn.microsoft.com/en-us/graph/api/message-move?view=graph-rest-1.0&tabs=http for more details