public function html2text($html, $options = array())
    {
        $default_options = array(
            'links'   => true,
            'width'   => 75,
            'body'    => $html,
            'charset' => RCUBE_CHARSET,
        );

        $options = array_merge($default_options, (array) $options);

        // Plugins may want to modify HTML in another/additional way
        $options = $this->plugins->exec_hook('html2text', $options);

        // Convert to text
        if (!$options['abort']) {
            $converter = new rcube_html2text($options['body'],
                false, $options['links'], $options['width'], $options['charset']);

            $options['body'] = rtrim($converter->get_text());
        }

        return $options['body'];
    }