alecpl
2008-10-08 acff900c5a3a7c89faaf1141eff706ec221a4dd3
commit | author | age
f11541 1 <?php
155bbb 2 /*
A 3
4  +-----------------------------------------------------------------------+
5  | bin/html2text.php                                                     |
6  |                                                                       |
7  | This file is part of the RoundCube Webmail client                     |
8  | Copyright (C) 2005-2008, RoundCube Dev. - Switzerland                 |
9  | Licensed under the GNU GPL                                            |
10  |                                                                       |
11  | PURPOSE:                                                              |
12  |   Convert HTML message to plain text                                  |
13  |                                                                       |
14  +-----------------------------------------------------------------------+
15  | Author: Thomas Bruederli <roundcube@gmail.com>                        |
16  +-----------------------------------------------------------------------+
17
18  $Id$
19
20 */
f11541 21
47124c 22 define('INSTALL_PATH', realpath('./../') . '/');
T 23 require INSTALL_PATH.'program/include/iniset.php';
f11541 24
9770fe 25 $converter = new html2text(html_entity_decode($HTTP_RAW_POST_DATA, ENT_COMPAT, 'UTF-8'));
f11541 26
T 27 header('Content-Type: text/plain; charset=UTF-8');
9770fe 28 print trim($converter->get_text());
f11541 29
809428 30 ?>