From f88d1bb3287e1174c485c3a047c9ce41b242d648 Mon Sep 17 00:00:00 2001 From: Robin Chalas Date: Tue, 4 Feb 2020 11:29:55 +0100 Subject: [PATCH] [Mailer] Fix MandrillHttpTransport::getRecipients()'s call --- .../Mailchimp/Tests/Transport/MandrillHttpTransportTest.php | 2 +- .../Mailer/Bridge/Mailchimp/Transport/MandrillHttpTransport.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Component/Mailer/Bridge/Mailchimp/Tests/Transport/MandrillHttpTransportTest.php b/src/Symfony/Component/Mailer/Bridge/Mailchimp/Tests/Transport/MandrillHttpTransportTest.php index dd2851154e..cfdc30bb78 100644 --- a/src/Symfony/Component/Mailer/Bridge/Mailchimp/Tests/Transport/MandrillHttpTransportTest.php +++ b/src/Symfony/Component/Mailer/Bridge/Mailchimp/Tests/Transport/MandrillHttpTransportTest.php @@ -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 ', $body['to'][0]); + $this->assertSame('saif.gmati@symfony.com', $body['to'][0]); $this->assertSame('Fabien ', $body['from_email']); $this->assertStringContainsString('Subject: Hello!', $message); diff --git a/src/Symfony/Component/Mailer/Bridge/Mailchimp/Transport/MandrillHttpTransport.php b/src/Symfony/Component/Mailer/Bridge/Mailchimp/Transport/MandrillHttpTransport.php index 09e728862c..e580437d5e 100644 --- a/src/Symfony/Component/Mailer/Bridge/Mailchimp/Transport/MandrillHttpTransport.php +++ b/src/Symfony/Component/Mailer/Bridge/Mailchimp/Transport/MandrillHttpTransport.php @@ -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(), ],