diff --git a/src/Service/SendGridService.php b/src/Service/SendGridService.php index 0eba53f..6fc0806 100644 --- a/src/Service/SendGridService.php +++ b/src/Service/SendGridService.php @@ -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(), @@ -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(); }