Skip to content

Commit a289293

Browse files
bug symfony#52268 [Mailer][Notifier] Update Sendinblue / Brevo API host (Stephanie)
This PR was merged into the 5.4 branch. Discussion ---------- [Mailer][Notifier] Update Sendinblue / Brevo API host | Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Issues | Fix symfony#52264 | License | MIT Sendinblue rebrands to Brevo, and it simultaneously upgrade smtp and API servers. There are 2 distincts API currently : api.sendinblue.com (deprecated but still running) and api.brevo.com (the one to use) Unlike SMTP host, API host is not changed on LTS 5.4 and are still set to api.sendinblue.com. Commits ------- 554e9cc [Mailer] [Notifier] symfony#52264 Update Sendinblue / Brevo API host
2 parents b769b77 + 554e9cc commit a289293

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/Symfony/Component/Mailer/Bridge/Sendinblue/Tests/Transport/SendinblueApiTransportTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public static function getTransportData()
3737
{
3838
yield [
3939
new SendinblueApiTransport('ACCESS_KEY'),
40-
'sendinblue+api://api.sendinblue.com',
40+
'sendinblue+api://api.brevo.com',
4141
];
4242

4343
yield [
@@ -89,7 +89,7 @@ public function testSendThrowsForErrorResponse()
8989
{
9090
$client = new MockHttpClient(function (string $method, string $url, array $options): ResponseInterface {
9191
$this->assertSame('POST', $method);
92-
$this->assertSame('https://api.sendinblue.com:8984/v3/smtp/email', $url);
92+
$this->assertSame('https://api.brevo.com:8984/v3/smtp/email', $url);
9393
$this->assertStringContainsString('Accept: */*', $options['headers'][2] ?? $options['request_headers'][1]);
9494

9595
return new MockResponse(json_encode(['message' => 'i\'m a teapot']), [
@@ -119,7 +119,7 @@ public function testSend()
119119
{
120120
$client = new MockHttpClient(function (string $method, string $url, array $options): ResponseInterface {
121121
$this->assertSame('POST', $method);
122-
$this->assertSame('https://api.sendinblue.com:8984/v3/smtp/email', $url);
122+
$this->assertSame('https://api.brevo.com:8984/v3/smtp/email', $url);
123123
$this->assertStringContainsString('Accept: */*', $options['headers'][2] ?? $options['request_headers'][1]);
124124

125125
return new MockResponse(json_encode(['messageId' => 'foobar']), [

src/Symfony/Component/Mailer/Bridge/Sendinblue/Transport/SendinblueApiTransport.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,6 @@ private function stringifyAddress(Address $address): array
180180

181181
private function getEndpoint(): ?string
182182
{
183-
return ($this->host ?: 'api.sendinblue.com').($this->port ? ':'.$this->port : '');
183+
return ($this->host ?: 'api.brevo.com').($this->port ? ':'.$this->port : '');
184184
}
185185
}

src/Symfony/Component/Notifier/Bridge/Sendinblue/SendinblueTransport.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
*/
2727
final class SendinblueTransport extends AbstractTransport
2828
{
29-
protected const HOST = 'api.sendinblue.com';
29+
protected const HOST = 'api.brevo.com';
3030

3131
private $apiKey;
3232
private $sender;

0 commit comments

Comments
 (0)