简体   繁体   中英

message: move The DestinationId parameter is missing

I want to move mails (copy or move), I use Microsoft\Graph\Graph, guzzlehttp/guzzle and php

I am missing the DestinationId parameter

here is the query I am using

$graph->createCollectionRequest("POST","/users/xxx@xxxx.com/mailFolders/$inbox_id/childFolders/$folder_id/messages/$message_id/move/")->execute();

and I don't know where to put DestinationId .

here is the error code I got

{
  "code":"ErrorInvalidParameter",
  "message":"The value of the parameter 'DestinationId' is empty."
}

I found $mailBody = array( "DestinationId" => "$message_id");

$graph->createCollectionRequest("POST","/users/xxx@xxxx.com/mailFolders/$inbox_id/childFolders/$folder_id/messages/$message_id/move/")->execute() ->attachBody($mailBody) ->execute();

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM