Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| dbd7b4711b | |||
| b60341f62d |
Generated
+14
-14
@@ -8,21 +8,21 @@
|
||||
"packages": [
|
||||
{
|
||||
"name": "guzzlehttp/guzzle",
|
||||
"version": "7.15.1",
|
||||
"version": "7.15.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/guzzle/guzzle.git",
|
||||
"reference": "61443dfb33c62f308ee8add20f45b4d6e4bf8d2f"
|
||||
"reference": "ae311b8f045ea93ce7b1c9cdb7cec06c53f944bc"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/guzzle/guzzle/zipball/61443dfb33c62f308ee8add20f45b4d6e4bf8d2f",
|
||||
"reference": "61443dfb33c62f308ee8add20f45b4d6e4bf8d2f",
|
||||
"url": "https://api.github.com/repos/guzzle/guzzle/zipball/ae311b8f045ea93ce7b1c9cdb7cec06c53f944bc",
|
||||
"reference": "ae311b8f045ea93ce7b1c9cdb7cec06c53f944bc",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-json": "*",
|
||||
"guzzlehttp/promises": "^2.5.1",
|
||||
"guzzlehttp/promises": "^2.5.2",
|
||||
"guzzlehttp/psr7": "^2.13",
|
||||
"php": "^7.2.5 || ^8.0",
|
||||
"psr/http-client": "^1.0",
|
||||
@@ -116,7 +116,7 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/guzzle/guzzle/issues",
|
||||
"source": "https://github.com/guzzle/guzzle/tree/7.15.1"
|
||||
"source": "https://github.com/guzzle/guzzle/tree/7.15.3"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -132,20 +132,20 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2026-07-18T11:23:11+00:00"
|
||||
"time": "2026-08-05T19:48:21+00:00"
|
||||
},
|
||||
{
|
||||
"name": "guzzlehttp/promises",
|
||||
"version": "2.5.1",
|
||||
"version": "2.5.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/guzzle/promises.git",
|
||||
"reference": "9ad1e4fc607446a055b95870c7f668e93b5cff29"
|
||||
"reference": "2823687acff28b2dbe67b2508a6b300e2c3fa4ce"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/guzzle/promises/zipball/9ad1e4fc607446a055b95870c7f668e93b5cff29",
|
||||
"reference": "9ad1e4fc607446a055b95870c7f668e93b5cff29",
|
||||
"url": "https://api.github.com/repos/guzzle/promises/zipball/2823687acff28b2dbe67b2508a6b300e2c3fa4ce",
|
||||
"reference": "2823687acff28b2dbe67b2508a6b300e2c3fa4ce",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -200,7 +200,7 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/guzzle/promises/issues",
|
||||
"source": "https://github.com/guzzle/promises/tree/2.5.1"
|
||||
"source": "https://github.com/guzzle/promises/tree/2.5.2"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -216,7 +216,7 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2026-07-08T15:48:39+00:00"
|
||||
"time": "2026-08-05T19:30:54+00:00"
|
||||
},
|
||||
{
|
||||
"name": "guzzlehttp/psr7",
|
||||
@@ -2556,5 +2556,5 @@
|
||||
"platform-overrides": {
|
||||
"php": "8.3"
|
||||
},
|
||||
"plugin-api-version": "2.6.0"
|
||||
"plugin-api-version": "2.9.0"
|
||||
}
|
||||
|
||||
@@ -912,21 +912,29 @@ class RemoteMailService {
|
||||
*
|
||||
* @since Release 2.0.0
|
||||
*/
|
||||
public function entitySubmitFresh(string $identityId, array $message, string $preSendTarget, string $postSentTarget): string {
|
||||
public function entitySubmitFresh(string $identityId, array $data, string $preSendTarget, string $postSentTarget): string {
|
||||
|
||||
$mail = new MailParametersRequest();
|
||||
$mail->parametersRaw($message);
|
||||
$message = new MailParametersRequest();
|
||||
$message->parametersRaw($data);
|
||||
|
||||
$messageCreateId = 'm_' . uniqid();
|
||||
$submissionCreateId = 's_' . uniqid();
|
||||
$messageId = 'm_' . uniqid();
|
||||
$submissionId = 's_' . uniqid();
|
||||
|
||||
$r0 = new MailSet($this->dataAccount, null, $this->resourceNamespace, $this->resourceEntityLabel);
|
||||
$createdMessage = $r0->create($messageCreateId, $mail);
|
||||
$createdMessage->in($preSendTarget);
|
||||
$m0 = $r0->create($messageId, $message);
|
||||
$m0->in($preSendTarget);
|
||||
$m0->draft(true);
|
||||
$m0->seen(true);
|
||||
|
||||
$r1 = new MailSubmissionSet($this->dataAccount, null, $this->resourceNamespace, $this->resourceEntityLabel);
|
||||
$submission = $r1->create($submissionCreateId);
|
||||
$submission->identity($identityId);
|
||||
$submission->message('#' . $messageCreateId);
|
||||
$r1->completionUpdate('#' . $messageId, [
|
||||
'mailboxIds/' . $postSentTarget => true,
|
||||
'mailboxIds/' . $preSendTarget => null,
|
||||
'keywords/$draft' => null,
|
||||
]);
|
||||
$s0 = $r1->create($submissionId);
|
||||
$s0->identity($identityId);
|
||||
$s0->message('#' . $messageId);
|
||||
|
||||
$bundle = $this->dataStore->perform([$r0, $r1]);
|
||||
$messageResponse = $bundle->response(0);
|
||||
@@ -934,7 +942,7 @@ class RemoteMailService {
|
||||
throw new Exception($messageResponse->type() . ': ' . $messageResponse->description(), 1);
|
||||
}
|
||||
if (method_exists($messageResponse, 'createFailure')) {
|
||||
$failure = $messageResponse->createFailure($messageCreateId);
|
||||
$failure = $messageResponse->createFailure($messageId);
|
||||
if (is_array($failure)) {
|
||||
$type = $failure['type'] ?? 'unknownError';
|
||||
$description = $failure['description'] ?? 'Email creation failed';
|
||||
@@ -950,7 +958,7 @@ class RemoteMailService {
|
||||
throw new Exception($response->type() . ': ' . $response->description(), 1);
|
||||
}
|
||||
|
||||
return $this->extractSubmissionIdentifier($response, $submissionCreateId);
|
||||
return $this->extractSubmissionIdentifier($response, $submissionId);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -978,18 +986,18 @@ class RemoteMailService {
|
||||
$requests = [];
|
||||
|
||||
if ($patch !== null && $patch !== []) {
|
||||
$draftMutation = new MailParametersRequest();
|
||||
$draftMutation->parametersRaw($patch);
|
||||
$m0 = new MailParametersRequest();
|
||||
$m0->parametersRaw($patch);
|
||||
$r0 = new MailSet($this->dataAccount, null, $this->resourceNamespace, $this->resourceEntityLabel);
|
||||
$r0->update($draftId, $draftMutation);
|
||||
$r0->update($draftId, $m0);
|
||||
$requests[] = $r0;
|
||||
}
|
||||
|
||||
$submissionCreateId = 's_' . uniqid();
|
||||
$submissionId = 's_' . uniqid();
|
||||
$r1 = new MailSubmissionSet($this->dataAccount, null, $this->resourceNamespace, $this->resourceEntityLabel);
|
||||
$submission = $r1->create($submissionCreateId);
|
||||
$submission->identity($identityId);
|
||||
$submission->message($draftId);
|
||||
$s0 = $r1->create($submissionId);
|
||||
$s0->identity($identityId);
|
||||
$s0->message($draftId);
|
||||
$requests[] = $r1;
|
||||
|
||||
$bundle = $this->dataStore->perform($requests);
|
||||
@@ -1002,19 +1010,7 @@ class RemoteMailService {
|
||||
throw new Exception($response->type() . ': ' . $response->description(), 1);
|
||||
}
|
||||
|
||||
return $this->extractSubmissionIdentifier($response, $submissionCreateId);
|
||||
}
|
||||
|
||||
private function collectionByRole(string $role): ?string {
|
||||
$filter = $this->collectionListFilter();
|
||||
$filter->condition('role', $role);
|
||||
|
||||
$collections = $this->collectionList(null, $filter, null);
|
||||
if ($collections === []) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return (string)array_key_first($collections);
|
||||
return $this->extractSubmissionIdentifier($response, $submissionId);
|
||||
}
|
||||
|
||||
private function extractSubmissionIdentifier(object $response, string $createId): string {
|
||||
|
||||
Reference in New Issue
Block a user