Get the email body

@return string
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;
    }
133812
public function GetMailMIME() {
    $result = '';
    switch($this->message_type) {
      case 'inline':
        $result .= $this->HeaderLine('Content-Type', 'multipart/related;');
        $result .= $this->TextLine("\tboundary=\"" . $this->boundary[1] . '"');
        break;
      case 'attach':
      case 'inline_attach':
      case 'alt_attach':
      case 'alt_inline_attach':
        $result .= $this->HeaderLine('Content-Type', 'multipart/mixed;');
        $result .= $this->TextLine("\tboundary=\"" . $this->boundary[1] . '"');
        break;
      case 'alt':
      case 'alt_inline':
        $result .= $this->HeaderLine('Content-Type', 'multipart/alternative;');
        $result .= $this->TextLine("\tboundary=\"" . $this->boundary[1] . '"');
        break;
      default:
        // Catches case 'plain': and case '':
        $result .= $this->HeaderLine('Content-Transfer-Encoding', $this->Encoding);
        $result .= $this->TextLine('Content-Type: '.$this->ContentType.'; charset='.$this->CharSet);
        break;
    }

    if($this->Mailer != 'mail') {
      $result .= $this->LE;
    }

    return $result;
  }
957010
public function getFieldBody()
    {
        if (!$this->getCachedValue()) {
            if (isset($this->address)) {
                $address = $this->addressEncoder->encodeString($this->address);
                $this->setCachedValue('<'.$address.'>');
            }
        }

        return $this->getCachedValue();
    }
39932
public function email()
    {
        $this->raw();

        $email = null;
        $person = $this->person();

        if (isset($person->emails)) {
            if (isset($person->emails->email)) {
                if (is_array($person->emails->email) && isset($person->emails->email[0])) {
                    $email = $person->emails->email[0]->value;
                }
            }
        }

        return $email;
    }
1050394
public function body() {
		$message = array();

		$message[] = Whip_MessageFormatter::strong( $this->title() ) . '<br />';
		$message[] = Whip_MessageFormatter::paragraph( Whip_Host::message( $this->messageKey ) );

		return implode( $message, "\n" );
	}
442138
protected function getRequestBody()
    {
        if (is_array($this->data)) {
            $this->data = http_build_query($this->data);
        }

        $this->prepareHeaders();

        $path = isset($this->uri['path']) ? $this->uri['path'] : '/';

        if (isset($this->uri['query'])) {
            $path .= "?{$this->uri['query']}";
        }

        $body = "{$this->method} $path HTTP/1.0\r\n";

        foreach ($this->headers as $name => $value) {
            $body .= "$name: " . trim($value) . "\r\n";
        }

        $body .= "\r\n{$this->data}";
        return $body;
    }
619177
public function getBody()
    {
        // first we should render the body if it was not rendered before
        if (is_null($this->body)) {
            $this->set('body', '');
            // this is unnormal situation, notifying developer
            $this->app->logger->logLine('Email body is null: '.$this->get('from').' >> '.
                    date($this->app->getConfig('locale/timestamp', 'Y-m-d H:i:s')."\n"), null, 'error');
        }
        //if(!isset($this->mime['text'])&&!isset($this->mime['html'])){
        $this->setBody(is_object($this->body) ? $this->body->render() : $this->body);
        //}
        // sign should be added to all parts
        if (isset($this->mime['text'])) {
            $this->mime['text']['content'] .= $this->getSign();
        }
        if (isset($this->mime['html'])) {
            $this->mime['html']['content'] .= $this->getSign();
            // HTML should be converted to base 64
            //$this->mime['html']['content']=base64_encode($this->mime['html']['content']);
            // no, it should be splitted
            //$this->mime['html']['content']=wordwrap($this->mime['html']['content'],76,"\r\n",false);
        }
        // now as we have all the needed parts set
        $result = '';
        // first we have to add a simple text for non-Mime readers
        if (count($this->mime) == 0) {
            $result .= $this->plain_text;
        }
        // adding mail parts
        foreach ($this->mime as $name => $att) {
            list($type) = explode(';', $att['type']);
            // $name is a file name/part name, $att is a hash with type and content
            // depending on the type adding a header
            switch ($type) {
                case 'text/plain':
                    if (count($this->mime) > 0) {
                        $result .= "\n\n--".$this->getBoundary()."\n".
                        'Content-Type: '.$att['type'].'; ';
                    }
                    //$result.="charset=UTF-8";
                    break;

                case 'text/html':
                    if (count($this->mime) > 0) {
                        $result .= "\n\n--".$this->getBoundary()."\n".
                        'Content-Type: '.$att['type'].'; ';
                    }
                    $result .=
                        'Content-Transfer-Encoding: 8bit';
                    $att['content'] = rtrim(wordwrap($att['content']));
                    break;
            }
            if (isset($att['attachment'])) {
                $att['content'] = rtrim(chunk_split($att['content']));
                $result .= "name=$name\n".
                    "Content-transfer-encoding: base64\nContent-Disposition: attachment;";
            }
            $result .= "\n\n";
            $result .= $att['content'];
        }
        // if there were any attachments, trailing boundary should be added
        if (count($this->mime) > 0) {
            $result .= "\n--".$this->getBoundary()."\n";
        }

        return ltrim($result);
    }
44836
public function getBody()
    {
        if ($this->body === null) {
            if ($this->bodyProvider !== null) {
                $this->body = ($this->bodyProvider)();
            } else {
                $this->body = stream_for(null);
            }
        }
        return $this->body;
    }
917622
public function getFieldBody() //TODO: Check caching here
    {
        $body = parent::getFieldBody();
        foreach ($this->params as $name => $value) {
            if (null !== $value) {
                // Add the parameter
                $body .= '; '.$this->createParameter($name, $value);
            }
        }

        return $body;
    }
1242459
public function getBody()
    {
        if ($this->stream)
            return $this->stream;
        
        $stream = $this->httpMessage->getBody();

        if ($stream instanceof iStreamable)
            $stream = new StreamBridgeInPsr($stream);
        else {
            $body   = (string) $stream;
            $stream = new Stream('php://temp', 'wb+');
            $stream->write($body);
            $stream->rewind();
        }
        
        return $this->stream = $stream;
    }
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;
    }
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;
    }
683876
protected function getPlainBody()
    {
        $charset    = $this->isUtf8($this->body['text/plain']) ? 'utf-8' : 'US-ASCII';
        $plane      = str_replace("\r", '', trim($this->body['text/plain']));
        $count      = ceil(strlen($plane) / 998);

        $body = array();
        $body[] = 'Content-Type: text/plain; charset='.$charset;
        $body[] = 'Content-Transfer-Encoding: 7bit';
        $body[] = null;

        for ($i = 0; $i < $count; $i++) {
            $body[] = substr($plane, ($i * 998), 998);
        }

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

        return $body;
    }
1302952
public function getNotificationEmail(): string
    {
        if ($this->userMeta->notification_email !== null && $this->userMeta->notification_email !== '') {
            return $this->userMeta->notification_email;
        }
        return $this->email;
    }
446587
public function parseBody() {
        $this->client->openFolder($this->folder_path);
        $this->structure = imap_fetchstructure($this->client->getConnection(), $this->uid, IMAP::FT_UID);

        if(property_exists($this->structure, 'parts')){
            $parts = $this->structure->parts;

            foreach ($parts as $part)  {
                foreach ($part->parameters as $parameter)  {
                    if($parameter->attribute == "charset")  {
                        $encoding = $parameter->value;

                        $encoding = preg_replace('/Content-Transfer-Encoding/', '', $encoding);
                        $encoding = preg_replace('/iso-8859-8-i/', 'iso-8859-8', $encoding);

                        $parameter->value = $encoding;
                    }
                }
            }
        }

        $this->fetchStructure($this->structure);

        return $this;
    }
105183
final public function getBodyText(): ?string
    {
        $iterator = new \RecursiveIteratorIterator($this, \RecursiveIteratorIterator::SELF_FIRST);
        foreach ($iterator as $part) {
            if (self::SUBTYPE_PLAIN === $part->getSubtype()) {
                return $part->getDecodedContent();
            }
        }

        // If message has no parts, return content of message itself.
        if (self::SUBTYPE_PLAIN === $this->getSubtype()) {
            return $this->getDecodedContent();
        }

        return null;
    }
567041
public function getBody() : string
    {
        return
            $this->cipher->getCipherText()->getRawBytes()
            . $this->cipher->getAuthenticationTag()->getRawBytes()
        ;
    }