Skip to content

Commit

Permalink
Merge pull request #160 from tdclaritum/feature/AllowCC
Browse files Browse the repository at this point in the history
Feature/allow cc
  • Loading branch information
roelvanduijnhoven authored May 10, 2024
2 parents 730acb3 + 5eda224 commit 524513f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Service/SendGridService.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,6 @@ public function send(Message $message): array
);
}

if (count($message->getCc())) {
throw new Exception\RuntimeException('SendGrid does not support CC addresses');
}

$parameters = [
'from' => $from->rewind()->getEmail(),
'fromname' => $from->rewind()->getName(),
Expand All @@ -106,6 +102,10 @@ public function send(Message $message): array
$parameters['to'][] = $address->getEmail();
}

foreach ($message->getCc() as $address) {
$parameters['cc'][] = $address->getEmail();
}

foreach ($message->getBcc() as $address) {
$parameters['bcc'][] = $address->getEmail();
}
Expand Down

0 comments on commit 524513f

Please sign in to comment.