minor #35589 [Mailer] Fix MandrillHttpTransport::getRecipients()'s call (chalasr)

This PR was merged into the 5.1-dev branch.

Discussion
----------

[Mailer] Fix MandrillHttpTransport::getRecipients()'s call

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | -
| License       | MIT
| Doc PR        | -

Should make the CI green.

Commits
-------

f88d1bb328 [Mailer] Fix MandrillHttpTransport::getRecipients()'s call
This commit is contained in:
Fabien Potencier 2020-02-04 11:37:49 +01:00
commit 9613f84df5
2 changed files with 2 additions and 2 deletions

View File

@ -59,7 +59,7 @@ class MandrillHttpTransportTest extends TestCase
$body = json_decode($options['body'], true);
$message = $body['raw_message'];
$this->assertSame('KEY', $body['key']);
$this->assertSame('Saif Eddin <saif.gmati@symfony.com>', $body['to'][0]);
$this->assertSame('saif.gmati@symfony.com', $body['to'][0]);
$this->assertSame('Fabien <fabpot@symfony.com>', $body['from_email']);
$this->assertStringContainsString('Subject: Hello!', $message);

View File

@ -49,7 +49,7 @@ class MandrillHttpTransport extends AbstractHttpTransport
$response = $this->client->request('POST', 'https://'.$this->getEndpoint().'/api/1.0/messages/send-raw.json', [
'json' => [
'key' => $this->key,
'to' => $this->getRecipients($envelope->getRecipients()),
'to' => $this->getRecipients($envelope),
'from_email' => $envelope->getSender()->toString(),
'raw_message' => $message->toString(),
],