Skip to content

Commit 2179ff6

Browse files
lalcebofabpot
authored andcommitted
Postal mailer transport message ID retrieval
1 parent a2b613e commit 2179ff6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Symfony/Component/Mailer/Bridge/Postal/Tests/Transport/PostalApiTransportTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public function testSend()
6464
$this->assertSame(base64_encode('some attachment'), $body['attachments'][0]['data']);
6565
$this->assertSame('foo@bar.fr', $body['reply_to']);
6666

67-
return new JsonMockResponse(['message_id' => 'foobar'], [
67+
return new JsonMockResponse(['data' => ['message_id' => 'foobar']], [
6868
'http_code' => 200,
6969
]);
7070
});

src/Symfony/Component/Mailer/Bridge/Postal/Transport/PostalApiTransport.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ protected function doSendApi(SentMessage $sentMessage, Email $email, Envelope $e
6464
throw new HttpTransportException('Unable to send an email: '.$result['message'].\sprintf(' (code %d).', $statusCode), $response);
6565
}
6666

67-
$sentMessage->setMessageId($result['message_id']);
67+
$sentMessage->setMessageId($result['data']['message_id']);
6868

6969
return $response;
7070
}

0 commit comments

Comments
 (0)