4 +-----------------------------------------------------------------------+
7 | This file is part of the RoundCube Webmail client |
8 | Copyright (C) 2005-2009, RoundCube Dev. - Switzerland |
9 | Licensed under the GNU GPL |
12 | Convert HTML message to plain text |
14 +-----------------------------------------------------------------------+
15 | Author: Thomas Bruederli <roundcube@gmail.com> |
16 +-----------------------------------------------------------------------+
18 $Id: html2text.php 2237 2009-01-17 01:55:39Z till $
22 define('INSTALL_PATH', realpath(dirname(__FILE__) . '/..') . '/');
23 require INSTALL_PATH . 'program/include/iniset.php';
25 $RCMAIL = rcmail::get_instance();
27 if (!empty($RCMAIL->user->ID)) {
28 $converter = new html2text($HTTP_RAW_POST_DATA);
30 header('Content-Type: text/plain; charset=UTF-8');
31 print trim($converter->get_text());
34 header("HTTP/1.0 403 Forbidden");
35 echo "Requires a valid user session";