Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public static function getTransportData()
{
yield [
new SendinblueApiTransport('ACCESS_KEY'),
'sendinblue+api://api.sendinblue.com',
'sendinblue+api://api.brevo.com',
];

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

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

return new MockResponse(json_encode(['messageId' => 'foobar']), [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,6 @@ private function stringifyAddress(Address $address): array

private function getEndpoint(): ?string
{
return ($this->host ?: 'api.sendinblue.com').($this->port ? ':'.$this->port : '');
return ($this->host ?: 'api.brevo.com').($this->port ? ':'.$this->port : '');
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
*/
final class SendinblueTransport extends AbstractTransport
{
protected const HOST = 'api.sendinblue.com';
protected const HOST = 'api.brevo.com';

private $apiKey;
private $sender;
Expand Down