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;
    }