Sets the passed message as multipart/mixed.

If the message has content, a new part is created and added as a child of
the message.  The message's content and content headers are moved to the
new part.

@param Message $message
8812
public function setMessageAsMixed(Message $message)
    {
        if ($message->hasContent()) {
            $part = $this->genericHelper->createNewContentPartFrom($message);
            $message->addChild($part, 0);
        }
        $this->setMimeHeaderBoundaryOnPart($message, 'multipart/mixed');
        $atts = $message->getAllAttachmentParts();
        if (!empty($atts)) {
            foreach ($atts as $att) {
                $att->markAsChanged();
            }
        }
    }
1068148
public function onMessage(Mf4phpMessage $message) : void
    {
        Preconditions::checkArgument($message instanceof ObjectMessage, "Message must be an instance of ObjectMessage");
        $object = $message->getObject();
        if ($object instanceof MessageWrapper) {
            $object = $object->getMessage();
        }
        parent::dispatch($object, self::emptyCallback());
    }
185452
private function SendMessage($message)
    {
        $this->signal_data->message = $message;
        
        $this->Send(
            \Peg\Lib\Signals\Type\Definitions::IMPORT_MESSAGE,
            $this->signal_data
        );
    }
243383
public function dispatch(Message $message): void
    {
        $this->messages[] = $message;

        // Add message to debug log.
        $context = $message->context ?? [];
        $this->logger->debug($message->message, $context);
    }
411676
protected function setCliMessage($message)
    {
        if (GC_CLI) {
            $this->cli->line($this->translation->text($message));
        }
    }
55259
public function setMessage(\Sopinet\ChatBundle\Entity\Message $message = null)
    {
        $this->message = $message;

        return $this;
    }
194334
protected function sendMessage(Message $message) {
		if(!$this->isIgnored($message)) {
			parent::sendMessage($message);
			$this->sentMessages[] = $message;
		}
	}
195555
private function formatMessage(Message &$message)
    {
        $body = $message->getBody();

        if ($body instanceof MimeMessage) {
            $body = $body->generateMessage();
        }

        $body = $this->normalizeNewlines($body);

        $message->setBody($body);
    }
391771
protected function setText(&$data, Swift_Mime_SimpleMessage $message)
    {
        foreach ($message->getChildren() as $attachment) {
            if (!$attachment instanceof Swift_MimePart) {
                continue;
            }
            $data['text'] = $attachment->getBody();
        }
    }
1078455
protected function setAttachment($email, Swift_Mime_Message $message)
	{
		foreach ($message->getChildren() as $attachment) {
			$tmp_filename = tempnam(sys_get_temp_dir(), 'att');
			file_put_contents($tmp_filename, $attachment->getBody());
			
			$email->addAttachment($tmp_filename, $attachment->getFilename());
			
			$this->tmp_files[] = $tmp_filename;
		}
	}
355421
public function section(string $message)
    {
        $this->style->newLine();
        $this->output->writeln(sprintf(
            '<info>>></> <title>%s</>',
            OutputFormatter::escapeTrailingBackslash($message)
        ));
        $this->style->newLine();
    }
895505
public function add(Message $message)
    {
        $this->queue->insert($message, is_null($message->getPosition()) ? null : -$message->getPosition());

        $this->copyQueue(clone $this->queue);

        return $this;
    }
850794
public function setMessage($message)
    {
        if ($message === null) {
            $this->message = null;
        } elseif (is_scalar($message) || method_exists($message, '__toString')) {
            $this->message = (string) $message;
        } else {
            throw new InvalidArgumentException('The message must be a string.');
        }

        return $this;
    }
1219579
private function sign(Message &$message)
    {
        // generate signature
        $signature = $this->generateSignature();

        // first remove the empty dkim header
        $message->getHeaders()->removeHeader('DKIM-Signature');

        // generate new header set starting with the dkim header
        $headerSet[] = new Dkim($this->getEmptyDkimHeader()->getFieldValue() . $signature);

        // then append existing headers
        $headers = $message->getHeaders();
        foreach($headers as $header) {
            $headerSet[] = $header;
        }

        // clear headers
        $message->getHeaders()->clearHeaders();

        // add the newly created header set with the dkim signature
        $message->getHeaders()->addHeaders($headerSet);
    }
560880
public function addMessage(Message $message, $prepend = false)
    {
        if (!$prepend) {
            $this->appendMessage($message);
        } else {
            $this->prependMessage($message);
        }

        return $this;
    }
1142194
public function setMessage($message, $param=null)
    {
        if ($param) {
            $message = sprintf($message, $param);
        }
        $this->message = $message;
        
        return $this;
    }
855098
public function send(Mail\Message $message)
    {
        $this->getMandrillClient();

        $body = $message->getBody();
        $attachments = [];

        switch (true) {
            case $body instanceof Message:
                $bodyHtml = $this->getHtmlPart($body);
                $bodyText = $this->getTextPart($body);
                $attachments = $this->getAttachments($body);
                break;
            case is_string($body):
                $bodyHtml = $body;
                $bodyText = $message->getBodyText();
                break;
            case is_object($body):
                $bodyHtml = $body->__toString();
                $bodyText = $message->getBodyText();
                break;
            default:
                throw new Exception\InvalidArgumentException(
                    sprintf(
                        '"%s" expectes a body that is a string, an object or a Zend\Mime\Message; received "%s"',
                        __METHOD__,
                        is_object($body) ? get_class($body) : gettype($body)
                    )
                );
                break;
        }

        $message = [
            'html' => $bodyHtml,
            'text' => $bodyText,
            'subject' => $message->getSubject(),
            'from_email' => $message->getFrom()->current()->getEmail(),
            'from_name' => $message->getFrom()->current()->getName(),
            'to' => array_merge(
                $this->mapAddressListToArray($message->getTo(), 'to'),
                $this->mapAddressListToArray($message->getCc(), 'cc'),
                $this->mapAddressListToArray($message->getBcc(), 'bcc')
            ),
            'headers' => $message->getHeaders()->toArray(),
            'subaccount' => $this->options->getSubAccount(),
            'attachments' => $attachments
        ];

        return $this->mandrillClient->messages->send($message);
    }