Skip to content

Commit

Permalink
fix: sendgrid
Browse files Browse the repository at this point in the history
  • Loading branch information
ChiragAgg5k committed Jan 14, 2025
1 parent 309027d commit e3b818e
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions src/Utopia/Messaging/Adapter/Email/Sendgrid.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,13 @@ public function getMaxMessagesPerRequest(): int
*/
protected function process(EmailMessage $message): array
{
$personalizations = [
[
'to' => \array_map(
fn ($to) => ['email' => $to],
$message->getTo()
),
$personalizations = \array_map(
fn ($to) => [
'to' => [['email' => $to]],
'subject' => $message->getSubject(),
],
];
$message->getTo()
);

if (!\is_null($message->getCC())) {
foreach ($message->getCC() as $cc) {
Expand Down

0 comments on commit e3b818e

Please sign in to comment.