Closed tds4u closed 3 years ago
Have you tried just using the createFolders()
function? It should be something like this:
$folderId = new \garethp\ews\API\Type\FolderIdType($folderId, $changeKey);
$api->createFolders($a, $folderId, [], 'IPF.Note');
Here's an example of how I do it in my tests. If you still wanted to build the request yourself, you'd do it a lot simpler, the way that createFolders
does anyway:
$folderId = new \garethp\ews\API\Type\FolderIdType($folderId, $changeKey);
$api->getClient()->CreateFolder([
'ParentFolderId' => $folderId->toArray(true),
'Folders' => ['Folder' => [ 'DisplayName' => $a, 'FolderClass' => 'IFP.Note' ] ]
]);
You don't need to create all those classes manually the way you do
Here's an example of how I do it in my tests. If you still wanted to build the request yourself, you'd do it a lot simpler, the way that
createFolders
does anyway:$folderId = new \garethp\ews\API\Type\FolderIdType($folderId, $changeKey); $api->getClient()->CreateFolder([ 'ParentFolderId' => $folderId->toArray(true), 'Folders' => ['Folder' => [ 'DisplayName' => $a, 'FolderClass' => 'IFP.Note' ] ] ]);
That works! Thx ;-)
Hello,
I think the code for creating a folder isn't really working. I tried, but no success.
The problem is them empty folder section " </ns2:Folders>".
SOAP XML:
If I manually add the following lines it works: