diff --git a/src/Symfony/Component/Mime/Message.php b/src/Symfony/Component/Mime/Message.php index 94a49764e491..b7ddb76bc780 100644 --- a/src/Symfony/Component/Mime/Message.php +++ b/src/Symfony/Component/Mime/Message.php @@ -122,8 +122,8 @@ public function toIterable(): iterable public function ensureValidity() { - if (!$this->headers->has('To')) { - throw new LogicException('An email must have a "To" header.'); + if (!$this->headers->has('To') && !$this->headers->has('Cc') && !$this->headers->has('Bcc')) { + throw new LogicException('An email must have a "To", "Cc", or "Bcc" header.'); } if (!$this->headers->has('From') && !$this->headers->has('Sender')) {