protected function formatEmailBody($rawEmailBody)
    {
        if (!$this->enableFormatting) {
            return $rawEmailBody;
        }

        $body = str_replace([CRLF, CR], LF, $rawEmailBody);
        $body = preg_replace('/\\n{2,}/', LF . LF, $body);

        return trim($body);
    }
protected function formatEmailBody($rawEmailBody)
    {
        if (!$this->enableFormatting) {
            return $rawEmailBody;
        }

        $body = str_replace([CRLF, CR], LF, $rawEmailBody);
        $body = preg_replace('/\\n{2,}/', LF . LF, $body);

        return trim($body);
    }
protected function formatEmailBody ( $ rawEmailBody ) { if ( ! $ this -> enableFormatting ) { return $ rawEmailBody ; } $ body = str_replace ( [ CRLF , CR ] , LF , $ rawEmailBody ) ; $ body = preg_replace ( '/\\n{2,}/' , LF . LF , $ body ) ; return trim ( $ body ) ; }
Formats the e-mail body if this is enabled.

Replaces single carriage returns or carriage return plus linefeed
with line feeds and strips surplus blank lines, so there are no more than
two line breaks behind one another.

@param string $rawEmailBody string raw e-mail body, must not be empty

@return string e-mail body, formatted if formatting is enabled, will not be empty
Formats the e - mail body if this is enabled .