Returns the generated body for all multipart types.

@return string
434019
public function generateBody()
    {
        $data = $this->noMimeMessage . ezcMailTools::lineBreak();
        foreach ( $this->parts as $part )
        {
            $data .= ezcMailTools::lineBreak() . '--' . $this->boundary . ezcMailTools::lineBreak();
            $data .= $part->generate();
        }
        $data .= ezcMailTools::lineBreak() . '--' . $this->boundary . '--';
        return $data;
    }
945042
protected function generateBody()
    {
        $message = new Mime\Message();

        $text = $this->generateHtml();
        $textPart = new Mime\Part($text);
        $textPart->type = 'text/html';
        $textPart->charset = 'UTF-8';
        $textPart->disposition = Mime\Mime::DISPOSITION_INLINE;
        $message->addPart($textPart);

        if (is_object($this->application->getContact()->getImage()) &&
            $this->application->getContact()->getImage()->getId()) {
            /* @var $image \Auth\Entity\UserImage */
            $image = $this->application->getContact()->getImage();
            $part = new Mime\Part($image->getResource());
            $part->setType($image->getType());
            $part->setEncoding(Mime\Mime::ENCODING_BASE64);
            $part->setFileName($image->getName());
            $part->setDisposition(Mime\Mime::DISPOSITION_ATTACHMENT);
            $message->addPart($part);
        }
        
        foreach ($this->application->getAttachments() as $attachment) { /* @var \Applications\Entity\Attachment $attachment*/
            /* @var  \Applications\Entity\Attachment $part */
            $part = new Mime\Part($attachment->getResource());
            $part->setType($attachment->getType());
            $part->encoding = Mime\Mime::ENCODING_BASE64;
            $part->filename = $attachment->getName();
            $part->disposition = Mime\Mime::DISPOSITION_ATTACHMENT;
            $message->addPart($part);
        }
        
        $this->setBody($message);
    }
1052169
protected function makeCurlBody() {
        $body = $this->body;

        if (is_string($body)) {
            return (string)$body;
        }

        $contentType = $this->getHeader('Content-Type');
        if (stripos($contentType, 'application/json') === 0) {
            $body = json_encode($body);
        }

        return $body;
    }
1105536
public function getContent() {
        static $content  = '';
        static $isRead = false;

        if (!$isRead) {
            if ($this->getContentType() == 'multipart/form-data') {
                // file upload
                if ($_POST) {                                                           // php://input is not available with
                    $content = '$_POST => '.print_r($_POST, true).NL;                   // enctype="multipart/form-data"
                    // TODO: we should limit excessive variable values to 1KB
                }
                $content .= '$_FILES => '.print_r($this->getFiles(), true);
            }
            else {
                // regular request body
                $content = file_get_contents('php://input');
            }
            $isRead = true;
        }
        return $content;
    }
844922
final public function getTransformedBody()
    {
        $encoding = (isset($this->headers["Content-Transfer-Encoding"])) ? $this->headers["Content-Transfer-Encoding"] : "";

        $rawBody = $this->getRawBody();

        switch ($encoding) {
            case "quoted-printable":
                return quoted_printable_decode($rawBody);
                break;
            case "base64":
                return base64_decode($rawBody);
                break;
            default:
                return $rawBody;
        }
    }
1242452
protected function getHtmlBody()
    {
        $charset    = $this->isUtf8($this->body['text/html']) ? 'utf-8' : 'US-ASCII';
        $html       = str_replace("\r", '', trim($this->body['text/html']));

        $encoded = explode("\n", $this->quotedPrintableEncode($html));
        $body   = array();
        $body[] = 'Content-Type: text/html; charset='.$charset;
        $body[] = 'Content-Transfer-Encoding: quoted-printable'."\n";

        foreach ($encoded as $line) {
            $body[] = $line;
        }

        $body[] = null;
        $body[] = null;

        return $body;
    }
1102524
public function generateBody()
    {
        $result = $this->addHeadersSection( $this->message ) . ezcMailTools::lineBreak();
        for ( $i = 0; $i < count( $this->recipients ); $i++ )
        {
            $result .= $this->addHeadersSection( $this->recipients[$i] ) . ezcMailTools::lineBreak();
        }
        return $result;
    }
170788
public function getObject()
	{
		if( !empty( $this->_embedded ) )
		{
			$parts = array();

			if( $this->_html != null )
			{
				$part = new Zend_Mime_Part( $this->_html );

				$part->charset = $this->_object->getCharset();
				$part->encoding = Zend_Mime::ENCODING_QUOTEDPRINTABLE;
				$part->disposition = Zend_Mime::DISPOSITION_INLINE;
				$part->type = Zend_Mime::TYPE_HTML;

				$parts = array( $part );
			}

			$msg = new Zend_Mime_Message();
			$msg->setParts( array_merge( $parts, $this->_embedded ) );

			// create html body (text and maybe embedded), modified afterwards to set it to multipart/related
			$this->_object->setBodyHtml( $msg->generateMessage() );

			$related = $this->_object->getBodyHtml();
			$related->type = Zend_Mime::MULTIPART_RELATED;
			$related->encoding = Zend_Mime::ENCODING_8BIT;
			$related->boundary = $msg->getMime()->boundary();
			$related->disposition = null;
			$related->charset = null;
		}
		else if( $this->_html != null )
		{
			$this->_object->setBodyHtml( $this->_html );
		}

		return $this->_object;
	}
1141231
private function generateBody()
    {
        $data = $this->readHelpGuide();
        $this->version = $data['version'];
        foreach ($data['help'] as $key => $value) {
            $data = [$key, $value];
            array_push($this->body, $data);
        }

    }
1349742
public function getParsedBody()
    {
        $content_type = $this->getHeaderLine('content-type');
        $method = $this->getServerParam('REQUEST_METHOD');

        if ('POST' === $method && (false !== \strpos($content_type, 'application/x-www-form-urlencoded') || false !== \strpos($content_type, 'multipart/form-data'))) {
            return $this->post;
        }

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

        if ('' === $body) {
            return;
        }

        if (false !== \strpos($content_type, 'application/json')) {
            return \Owl\safe_json_decode($body, true);
        }

        return $body;
    }
567027
public function body()
    {
        $text = $this->entity->body;
        preg_match_all('/{!! ([a-z]+):([0-9]+) !!}/', $text, $matches, PREG_SET_ORDER);
        $patterns = [];
        $replacements = [];
        $lang = config('app.locale');
        if (is_array($matches)) {
            foreach ($matches as $match) {
                $patterns[] = $match[0];
                $module = $match[1];
                $repository = app('TypiCMS\Modules\\'.ucfirst(Str::plural($module)).'\Repositories\Eloquent'.ucfirst($module));
                $model = $repository->published()->find($match[2]);
                if (!$model) {
                    continue;
                }
                if ($module == 'page') {
                    $replacements[] = url($model->uri($lang));
                } else {
                    if (Route::has($lang.'::'.$module)) {
                        $replacements[] = route($lang.'::'.$module, $model->slug);
                    } else {
                        $replacements[] = '';
                    }
                }
            }
        }

        return str_replace($patterns, $replacements, $text);
    }
102770
public function getRawBody(): string
	{
		if($this->rawBody === null)
		{
			$this->rawBody = file_get_contents('php://input');
		}

		return $this->rawBody;
	}
493109
protected function getBody()
    {
        $data = $this->form->data();

        unset($data[self::EMAIL_KEY]);
        unset($data[self::RECEIVE_COPY_KEY]);
        $body = '';
        foreach ($data as $key => $value) {
            if (is_array($value)) {
                $value = implode(', ', array_filter($value, function ($i) {
                    return $i !== '';
                }));
            }

            $body .= ucfirst($key).': '.$value."\n\n";
        }

        return $body;
    }
1161407
public function getProcessedBody()
    {
        $r = preg_split(MailImporter::getMessageBodyHashRegularExpression(), $this->body);
        $message = $r[0];
        $r = preg_replace(array(
            '/^On (.*) at (.*), (.*) wrote:/sm',
            '/[\n\r\s\>]*\Z/i',
        ), '', $message);

        return $r;
    }
710551
function getBody()
    {
        if (null === $this->body) {
            $ctx    = new Context($this->environment);
            $result = '';

            $body = $ctx->evaluate($this->path, array(
                "data" => parent::getBody(),
                "processors" => $this->getProcessors()
            ), $this->getLogicalPath());

            $this->dependencies = array_merge($this->dependencies, $ctx->dependencyPaths);

            $result .= join("\n", $ctx->dependencyAssets);
            $result .= $body;

            $this->body = $result;
        }

        return $this->body;
    }
338804
public function getBody()
    {
        $body = $this->dom->getElementsByTagName('body');
        if ($body->length) {
            return $body->item(0);
        }

        $bodyelt = $this->dom->createElement('body');
        $this->dom->documentElement->appendChild($bodyelt);

        return $bodyelt;
    }
1021996
public function compileHeaders()
    {
        if (count($this->attachement) > 0) {
            $this->headers[] = "Content-type: multipart/mixed; boundary=\"{$this->boundary}\"" . self::END;

            foreach ($this->attachement as $file) {
                $filename = basename($file);
                $this->headers[] = "--" . $this->boundary;
                $this->headers[] = "Content-Type: application/octet-stream; name=\"{$filename}\"";
                $this->headers[] = "Content-Transfer-Encoding: base64";
                $this->headers[] = "Content-Disposition: attachment" . self::END;
                $this->headers[] = chunk_split(base64_encode(file_get_contents($file)));
            }

            $this->headers[] = "--" . $this->boundary;
        }

        return implode(self::END, $this->headers).self::END;
    }