protected function getRecipients(Swift_Mime_SimpleMessage $message): array
    {
        $recipients = [];

        if ($message->getTo() !== null) {
            foreach ($message->getTo() as $email => $name) {
                $recipients[] = ['address' => \compact('name', 'email')];
            }
        }

        if ($message->getCc() !== null) {
            foreach ($message->getCc() as $email => $name) {
                $recipients[] = ['address' => \compact('name', 'email')];
            }
        }

        if ($message->getBcc() !== null) {
            foreach ($message->getBcc() as $email => $name) {
                $recipients[] = ['address' => \compact('name', 'email')];
            }
        }

        return $recipients;
    }