You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Version (e.g. 1.0, dev-master): dev-master
PHP version: php 7.3
Microsoft Exchange version: exchange 2016
Description of problem:
Cannot get message id and change key after send message, I want use these info to reply next time.
Example request:
protectedfunction_sendMessage($messageId, $changeKey)
{
// Build the request.$request = newSendItemType();
$request->SaveItemToFolder = true;
$request->ItemIds = newNonEmptyArrayOfBaseItemIdsType();
// Add the message to the request.$item = newItemIdType();
$item->Id = $messageId;
$item->ChangeKey = $changeKey;
$request->ItemIds->ItemId[] = $item;
// Configure the folder to save the sent message to.$send_folder = newTargetFolderIdType();
$send_folder->DistinguishedFolderId = newDistinguishedFolderIdType();
$send_folder->DistinguishedFolderId->Id = DistinguishedFolderIdNameType::SENT;
$request->SavedItemFolderId = $send_folder;
$response = $this->client->SendItem($request);
$result = [];
// Iterate over the results, printing any error messages.$response_messages = $response->ResponseMessages->SendItemResponseMessage;
foreach ($response_messagesas$response_message) {
// Make sure the request succeeded.if ($response_message->ResponseClass != ResponseClassType::SUCCESS) {
$code = $response_message->ResponseCode;
$message = $response_message->MessageText;
$result['response'][] = [
'code' => $response_message->ResponseCode,
'message' => $response_message->MessageText,
];
\Yii::error("Message failed to create with \"$code: $message\"\n");
continue;
}
$result['items'][] = $response_message;
\Yii::info("Message sent successfully.\n");
}
return$result;
}
Example response:
array:1 [▼
0 => jamesiarmes\PhpEws\Response\ItemInfoResponseMessageType {#207 ▼
+Items: jamesiarmes\PhpEws\ArrayType\ArrayOfRealItemsType {#208 ▼
+CalendarItem: []
+Contact: []
+DistributionList: []
+Item: []
+MeetingCancellation: []
+MeetingMessage: []
+MeetingRequest: []
+MeetingResponse: []
+Message: []
+PostItem: []
+Task: []
}
+DescriptiveLinkKey: 0
+MessageText: "The specified object was not found in the store., The process failed to get the correct properties."
+MessageXml: null
+ResponseClass: "Error"
+ResponseCode: "ErrorItemNotFound"
}
]
Additional details:
I built a draft message, it can get the message id and change key, then use it to send message successfully. but can use this message id and change key to reply. and throw this error:
The specified object was not found in the store., The process failed to get the correct properties.
How to get message id and change key after send a message?
The text was updated successfully, but these errors were encountered:
Version (e.g. 1.0, dev-master): dev-master
PHP version: php 7.3
Microsoft Exchange version: exchange 2016
Description of problem:
Cannot get message id and change key after send message, I want use these info to reply next time.
Example request:
Example response:
Additional details:
I built a draft message, it can get the message id and change key, then use it to send message successfully. but can use this message id and change key to reply. and throw this error:
How to get message id and change key after send a message?
The text was updated successfully, but these errors were encountered: