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

This commit is contained in:
Robin Chalas 2020-02-04 11:29:55 +01:00
parent c29989d69e
commit f88d1bb328
2 changed files with 2 additions and 2 deletions

View File

@ -57,7 +57,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

@ -47,7 +47,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(),
],