public function createEmailMessage($messageCode, $from, $to, $messageParameters = [], $locale = null, $cc = [], $bcc = [], $replyTo = [])
    {
        if (null !== $message = MessageQuery::getFromName($messageCode)) {
            if ($locale === null) {
                $locale = Lang::getDefaultLanguage()->getLocale();
            }

            $message->setLocale($locale);

            // Assign parameters
            foreach ($messageParameters as $name => $value) {
                $this->parser->assign($name, $value);
            }

            $this->parser->assign('locale', $locale);

            $instance = $this->getMessageInstance();

            $this->setupMessageHeaders($instance, $from, $to, $cc, $bcc, $replyTo);

            $message->buildMessage($this->parser, $instance);

            return $instance;
        }

        throw new \RuntimeException(
            Translator::getInstance()->trans(
                "Failed to load message with code '%code%', propably because it does'nt exists.",
                [ '%code%' => $messageCode ]
            )
        );
    }