We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 620f717 commit 8f5a17eCopy full SHA for 8f5a17e
src/Illuminate/Mail/Transport/ResendTransport.php
@@ -4,6 +4,7 @@
4
5
use Exception;
6
use Resend\Contracts\Client;
7
+use Symfony\Component\HttpFoundation\Response;
8
use Symfony\Component\Mailer\Envelope;
9
use Symfony\Component\Mailer\Exception\TransportException;
10
use Symfony\Component\Mailer\SentMessage;
@@ -97,6 +98,8 @@ protected function doSend(SentMessage $message): void
97
98
'text' => $email->getTextBody(),
99
'attachments' => $attachments,
100
]);
101
+
102
+ throw_if($result['statusCode'] != Response::HTTP_OK, Exception::class, $result['message']);
103
} catch (Exception $exception) {
104
throw new TransportException(
105
sprintf('Request to Resend API failed. Reason: %s.', $exception->getMessage()),
0 commit comments