diff --git a/src/Symfony/Component/Mailer/Bridge/Brevo/Transport/BrevoApiTransport.php b/src/Symfony/Component/Mailer/Bridge/Brevo/Transport/BrevoApiTransport.php index 5e5050f77d19..2aa32dc80b8a 100644 --- a/src/Symfony/Component/Mailer/Bridge/Brevo/Transport/BrevoApiTransport.php +++ b/src/Symfony/Component/Mailer/Bridge/Brevo/Transport/BrevoApiTransport.php @@ -65,7 +65,7 @@ protected function doSendApi(SentMessage $sentMessage, Email $email, Envelope $e } if (201 !== $statusCode) { - throw new HttpTransportException('Unable to send an email: '.$result['message'].sprintf(' (code %d).', $statusCode), $response); + throw new HttpTransportException('Unable to send an email: '.($result['message'] ?? $response->getContent(false)).sprintf(' (code %d).', $statusCode), $response); } $sentMessage->setMessageId($result['messageId']); diff --git a/src/Symfony/Component/Notifier/Bridge/Brevo/BrevoTransport.php b/src/Symfony/Component/Notifier/Bridge/Brevo/BrevoTransport.php index 3c420044e2af..5f3c801bdc2f 100644 --- a/src/Symfony/Component/Notifier/Bridge/Brevo/BrevoTransport.php +++ b/src/Symfony/Component/Notifier/Bridge/Brevo/BrevoTransport.php @@ -75,7 +75,7 @@ protected function doSend(MessageInterface $message): SentMessage if (201 !== $statusCode) { $error = $response->toArray(false); - throw new TransportException('Unable to send the SMS: '.$error['message'], $response); + throw new TransportException('Unable to send the SMS: '.($error['message'] ?? $response->getContent(false)), $response); } $success = $response->toArray(false);
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies: