private function adaptMessage(Message $message, array $to, array $cc, array $bcc): Swift_Message
    {
        $swiftMessage = new Swift_Message($message->subject(), null, $message->content()->mimeType());
        $cids = $this->moveAttachments($message, $swiftMessage);
        $swiftMessage->setBody(str_replace(array_keys($cids), $cids, $message->content()));

        if ($message->content()->asPlainText()) {
            $swiftMessage->addPart($message->content()->asPlainText(), 'text/plain');
        }

        $swiftMessage->setTo(array_merge($this->adaptAddresses($message->to()), $this->adaptAddresses($to)));
        $swiftMessage->setCc(array_merge($this->adaptAddresses($message->cc()), $this->adaptAddresses($cc)));
        $swiftMessage->setBcc(array_merge($this->adaptAddresses($message->bcc()), $this->adaptAddresses($bcc)));
        $swiftMessage->setSender($this->adaptAddresses([$message->sender()]));
        $swiftMessage->setFrom($this->adaptAddresses($message->from()));

        return $swiftMessage;
    }