protected function renderTextBody($body)
    {
        $body = html_entity_decode(
            trim(strip_tags(preg_replace('/<(head|title|style|script)[^>]*>.*?<\/\\1>/s', '', $body))), ENT_QUOTES
        );

        if (empty($body)) {
          $body = 'To view this email, open it an email client that supports HTML.';
        }

        return $body;
    }
protected function renderTextBody($body)
    {
        $body = html_entity_decode(
            trim(strip_tags(preg_replace('/<(head|title|style|script)[^>]*>.*?<\/\\1>/s', '', $body))), ENT_QUOTES
        );

        if (empty($body)) {
          $body = 'To view this email, open it an email client that supports HTML.';
        }

        return $body;
    }
protected function renderTextBody ( $ body ) { $ body = html_entity_decode ( trim ( strip_tags ( preg_replace ( '/<(head|title|style|script)[^>]*>.*?<\/\\1>/s' , '' , $ body ) ) ) , ENT_QUOTES ) ; if ( empty ( $ body ) ) { $ body = 'To view this email, open it an email client that supports HTML.' ; } return $ body ; }
Strip html tags and render a text-only version.

@param   string  $body

@return  string
Strip html tags and render a text - only version .