protected function transformMessage(ParsedMessage $parsedMessage)
    {
        $message = new \Swift_Message();

        if ($from = $parsedMessage->getFrom()) {
            $message->setFrom($from);
        }

        // handle to with defaults
        if ($to = $parsedMessage->getTo()) {
            $message->setTo($to);
        }

        // handle cc with defaults
        if ($cc = $parsedMessage->getCc()) {
            $message->setCc($cc);
        }

        // handle bcc with defaults
        if ($bcc = $parsedMessage->getBcc()) {
            $message->setBcc($bcc);
        }

        // handle reply to with defaults
        if ($replyTo = $parsedMessage->getReplyTo()) {
            $message->setReplyTo($replyTo);
        }

        // handle subject with default
        if ($subject = $parsedMessage->getSubject()) {
            $message->setSubject($subject);
        }

        // handle body, no default values here
        $message->setBody($parsedMessage->getMessageText());
        if ($parsedMessage->getMessageHtml()) {
            $message->addPart($parsedMessage->getMessageHtml(), 'text/html');
        }

        return $message;
    }