diff --git a/src/Utopia/Messaging/Adapters/Email/Infobip.php b/src/Utopia/Messaging/Adapters/Email/Infobip.php new file mode 100644 index 00000000..ab43814f --- /dev/null +++ b/src/Utopia/Messaging/Adapters/Email/Infobip.php @@ -0,0 +1,48 @@ +request( + method: 'POST', + url: 'https://3ggzv1.api.infobip.com', + headers: [ + 'Content-Type: multipart/form-data', + 'Authorization: App ' . $this->apiKey, + ], + body: \json_encode([ + 'subject' => $message->getSubject(), + 'to' => \array_map( + fn ($to) => ['email' => $to], + $message->getTo() + ), + 'from' => [ + 'email' => $message->getFrom(), + ], + 'attachment' => $message->getAttachments(), + 'html' => $message->isHtml(), + + ]), + ); + } +} \ No newline at end of file