Sets body

@param *string $body The raw body
@param bool    $html Is this an html body?

@return Eden\Mail\Smtp
424003
public function setBody($body, $html = false)
    {
        Argument::i()
            ->test(1, 'string')
            ->test(2, 'bool');

        if ($html) {
            $this->body['text/html'] = $body;
            $body = strip_tags($body);
        }

        $this->body['text/plain'] = $body;

        return $this;
    }
707288
public function setBody($body)
    {
        $this->_body = $body;
        $this->setHeader('content-length', $body === null ? null : strlen($body));
    }
247406
public function html(string $body): ResponseInterface
    {
        $response = $this->responseFactory->createResponse();
        $response->getBody()->write($body);

        return $response->withHeader('Content-type', 'text/html; charset=UTF-8');
    }
132734
public function setBody(\GoetasWebservices\SoapServices\SoapClient\Envelope\SoapEnvelope12\Messages\FaultBody $body)
    {
        $this->body = $body;
        return $this;
    }
1359875
protected function handleBody($body)
    {
        if (is_string($body)) {
            $stream = new Stream('php://temp', 'wb+');
            $stream->write($body);
            $stream->rewind();

            $body = $stream;
        }

        if (!$body instanceof StreamInterface) {
            throw new \InvalidArgumentException(
                sprintf(
                    'Invalid body content type %s, please provide string or StreamInterface',
                    gettype($body)
                )
            );
        }

        return $body;
    }
833495
public function body($body = null)
    {
        if (!is_null($body)) {
            $this->write($body, true);
        }

        return $this->body;
    }
279257
public function setBody($file, $body)
	{
		if(array_pop(explode('.', $file)) == 'markdown')
			return Markdown::defaultTransform($body);
		else
			return $body;
	}
1334235
public function setBody($body = null)
    {
        if (is_object($body)) {
            $body = (string) $body;
        }

        $this->data['body'] = $body;
        return $this;
    }
353967
public function setHtml(string $html=null, bool $append=true) :self {
		// append by default or replace html
		$this->content = $append ? $this->content . $html : $html;
		// return self
		return($this);
	}
565892
public function setUserBody($isBody = FALSE)
    {
        $this->isBody = $isBody;
        $this->debug->info(__FUNCTION__, 'setUserBody: ', $this->referrer);

        return $this;
    }
440845
protected function setBody($body = null)
    {
        if (is_string($body) || is_null($body)) {
            $this->body = $body;
        } elseif (is_object($body) && method_exists($body, '__toString')) {
            $this->body = $body->__toString();
        } else {
            $this->body = json_encode($body);
            $this->setHeader('Content-Type', 'application/json');
        }
    }
1016194
public function setBody($body) {
    if (is_array($body) || is_object($body))
      $this->body = (object) $body;
    else
      $this->body = $body;
    return $this;
  }
41617
protected function setBody($body, $contentType)
    {
        $message = $this->getSwiftMessage();
        $oldBody = $message->getBody();
        $charset = $message->getCharset();
        if (empty($oldBody)) {
            $parts = $message->getChildren();
            $partFound = false;
            foreach ($parts as $key => $part) {
                if (!($part instanceof \Swift_Mime_Attachment)) {
                    /* @var $part \Swift_Mime_MimePart */
                    if ($part->getContentType() == $contentType) {
                        $charset = $part->getCharset();
                        unset($parts[$key]);
                        $partFound = true;
                        break;
                    }
                }
            }
            if ($partFound) {
                reset($parts);
                $message->setChildren($parts);
                $message->addPart($body, $contentType, $charset);
            } else {
                $message->setBody($body, $contentType);
            }
        } else {
            $oldContentType = $message->getContentType();
            if ($oldContentType == $contentType) {
                $message->setBody($body, $contentType);
            } else {
                $message->setBody(null);
                $message->setContentType(null);
                $message->addPart($oldBody, $oldContentType, $charset);
                $message->addPart($body, $contentType, $charset);
            }
        }
    }
729906
protected function _sendTextBody($textBody)
    {
        $this->_writeLine('Content-Type: text/plain; charset=utf-8');
        $this->_writeLine('Content-Length: ' . strlen($textBody));
        $this->_writeLine('Content-Transfer-Encoding: base64');
        $this->_writeLine();
        $this->_writeLine(chunk_split(base64_encode($textBody), 983));

        return $this;
    }
1282640
public function setHtml($Html)
    {
        if (! is_object($Html) || ! $Html instanceof HtmlObject) {
            throw new \InvalidArgumentException(
                'The HTML Object must be a valid HTML Object'
            );
        }
        $this->Html = $Html;

        return true;
    }
399078
public function setBodyHtml($html, $charset = null, $encoding = Zend_Mime::ENCODING_QUOTEDPRINTABLE)
    {
        if ($charset === null) {
            $charset = $this->_charset;
        }

        $mp = new Zend_Mime_Part($html);
        $mp->encoding = $encoding;
        $mp->type = Zend_Mime::TYPE_HTML;
        $mp->disposition = Zend_Mime::DISPOSITION_INLINE;
        $mp->charset = $charset;

        $this->_bodyHtml = $mp;

        return $this;
    }
820904
public function setBody($body, $content_type = false){
	
		// clear old body data
		$this->post->clear();
		$this->files->clear();
		
		// is this form data?
		if(is_array($body)){
			$body = http_build_query($body);
		}
		
		$this->body = (string)$body;
		
		// plain text should be: text/plain; charset=UTF-8
		if($content_type){
			$this->headers->set('content-type', $content_type);
		}
		
		// do it!
		$this->prepare();
	}