(non-PHPdoc)
@see \JaegerApp\Email\SwiftAbstract::getMessage()
359881
public function getMessage(array $to, $from_email, $from_name, $subject, $message_body, array $attachments, $mail_type='html')
    {
        $message = \Swift_Message::newInstance();
        $message->setTo($to);
        if ($attachments) {
            foreach ($attachments as $attachment) {
                foreach ($attachment as $file => $alt_name) {
                    if ($alt_name == '') {
                        $message->attach(\Swift_Attachment::fromPath($file));
                    } else {
                        $message->attach(\Swift_Attachment::fromPath($file)->setFilename($alt_name));
                    }
                }
            }
        }
        
        $message->setFrom($from_email, $from_name);
        $message->setSubject($subject);
        if ($mail_type == 'html') {
            $message->setBody($message_body, 'text/html');
        } else {
            $message->setBody($message_body);
        }
        
        return $message;
    }
235593
public function getMessage($name = null)
    {
        if ($name === null) {
            return $this->message;
        }
        return str_replace(':name', $name, $this->message);
    }
1294159
public static function getMessage(ConfigObject $config)
    {
        $message = new Message($config);

        if ($config->get('Sender', false)) {
            $sender = new Email($config->get('Sender.Email', 'me@localhost'), $config->get('Sender.Name', null));
            $message->setSender($sender);

            // Fix/Hack (wasn't in headers before)
            $message->setFrom($sender);
        }

        return $message;
    }
151994
public static function getMessage($code)
    {
        return isset(self::$__messages[$code]) ? self::$__messages[$code] : null;
    }
1052524
public function getText()
    {
        $text = $this->message[0];
        if (!is_string($text)) {
            if ($text instanceof \Throwable || $text instanceof \Exception) {
                $text = (string) $text;
            } else {
                $text = VarDumper::export($text);
            }
        }
        return $text;
    }
321890
public function getMessage($validator, string $field, array $args = [], $message = null): string
    {
        $rawName = \is_string($validator) ? $validator : 'callback';
        $params  = [
            '{attr}' => $this->getTranslate($field)
        ];

        // get message from built in dict.
        if (!$message) {
            $message = $this->findMessage($field, $rawName) ?: GlobalMessage::getDefault();
            // is array. It's defined multi error messages
        } elseif (\is_array($message)) {
            $message = $message[$rawName] ?? $this->findMessage($field, $rawName);

            if (!$message) { // use default
                return \strtr(GlobalMessage::getDefault(), $params);
            }
        } else {
            $message = (string)$message;
        }

        /** @see GlobalMessage::$messages['size'] */
        if (\is_array($message)) {
            $msgKey  = \count($args);
            $message = $message[$msgKey] ?? $message[0];
        }

        if (false === \strpos($message, '{')) {
            return $message;
        }

        foreach ($args as $key => $value) {
            $key = \is_int($key) ? "value{$key}" : $key;
            // build params
            $params['{' . $key . '}'] = \is_array($value) ? \implode(',', $value) : $value;
        }

        return \strtr($message, $params);
    }
1188518
public function getMessage($id)
    {
        // TODO that's ugly, would be better to let the message class decide
        if (strtolower($this->_messageClass) == 'zend_mail_message_file' || is_subclass_of($this->_messageClass, 'zend_mail_message_file')) {
            // TODO top/body lines
            $messagePos = $this->_getPos($id);
            return new $this->_messageClass(array('file' => $this->_fh, 'startPos' => $messagePos['start'],
                                                  'endPos' => $messagePos['end']));
        }

        $bodyLines = 0; // TODO: need a way to change that

        $message = $this->getRawHeader($id);
        // file pointer is after headers now
        if ($bodyLines) {
            $message .= "\n";
            while ($bodyLines-- && ftell($this->_fh) < $this->_positions[$id - 1]['end']) {
                $message .= fgets($this->_fh);
            }
        }

        return new $this->_messageClass(array('handler' => $this, 'id' => $id, 'headers' => $message));
    }
347997
public function getMessage($key) {
        return $this->cache([__METHOD__, $key], function(GettextTranslator $translator) use ($key) {
            list($domain, $catalog, $id) = $translator->parseKey($key);

            $translator->bindDomains($domain, $catalog);

            textdomain($catalog);

            $message = gettext($id);

            if ($message !== $id) {
                return $message;
            }

            throw new MissingMessageException(sprintf('Message key %s does not exist in %s', $key, Locale::DEFAULT_LOCALE));
        });
    }
954639
public function getShortMessage($message)
    {
        static $hasMbString;

        if (null === $hasMbString) {
            $hasMbString = function_exists('mb_strlen');
        }

        $maxLength = 45;

        if ($hasMbString) {
            if (mb_strlen($message, 'UTF-8') > $maxLength) {
                $message = mb_substr($message, 0, $maxLength - 4, 'UTF-8') . ' ...';
            }
        } else {
            if (strlen($message) > $maxLength) {
                $message = substr($message, 0, $maxLength - 4) . ' ...';
            }
        }

        return $message;
    }
387668
@Override
    public String getMessage() {
        String message = super.getMessage();
        if (mType != null) {
            message = mType.getName() + ": " + message;
        }
        return message;
    }
1140110
private function getMessage(string $subject, string $message): \Swift_Message
    {
        $messageObject = new \Swift_Message($subject, $message);
        $messageObject
            ->setFrom([$this->config('mailer.sender_email') => $this->config('mailer.sender_name')])
            ->setTo($this->config('mailer.recipients'))
        ;

        return $messageObject;
    }
1045295
public function getServerMessage()
    {
        if (isset($this->_details[self::ENTRY_MESSAGE])) {
            return $this->_details[self::ENTRY_MESSAGE];
        }

        return null;
    }
803147
public function getMessageFile()
    {
        $name = $this->domain;
        $name .= $this->_types[$this->type];
        return $name;
    }
1022068
private function getMessage(string $message): string
    {
        /** @var FormatterFactoryInterface $factory */
        $factory   = $this->getContainer()->get(FormatterFactoryInterface::class);
        $formatter = $factory->createFormatter(Messages::NAMESPACE_NAME);
        $result    = $formatter->formatMessage($message);

        return $result;
    }
674674
public function message()
    {
        if (!$this->error) {
            return '';
        }
        if (isset($this->message)) {
            return $this->message;
        }
        if ($this->messenger) {
            $type          = $this->getType();
            $method        = $this->getErrorMethod();
            $parameter     = $this->getParameter();
            $this->message = $this->messenger->find($type, $method, $parameter);
            
            return $this->message;
        }

        throw new \BadMethodCallException('cannot return a message. ');
    }
363573
public function getMessage($index)
    {
        if (!$this->hasMessage($index)) {
            throw new \Exception('Message not found : ' . $index);
        }

        return $this->messages[$index];
    }
1351140
public function getSwiftMessage()
    {
        $message = \Swift_Message::newInstance();

        if (true === is_array($this->getRecipient())) {
            $recipient = $this->getRecipient();
        } else {
            $recipient = [
                $this->getRecipient(),
            ];
        };

        $message
            ->setSubject($this->getSubject())
            ->setFrom(
                [
                    $this->getSender(),
                ]
            )
            ->setTo($recipient)
            ->setBody($this->getMessage());

        if (0 < count($this->getAttachments())) {
            foreach ($this->getAttachments() as $attachment) {
                $message->attach($attachment);
            }
        }

        return $message;
    }