thomascube
2010-12-17 db1a87cd6c506f2afbd1a37c64cb56ae11120b49
commit | author | age
dd53e2 1 <?php
T 2 /*
677e1f 3
dd53e2 4  +-----------------------------------------------------------------------+
677e1f 5  | program/steps/utils/html2text.inc                                     |
dd53e2 6  |                                                                       |
e019f2 7  | This file is part of the Roundcube Webmail client                     |
A 8  | Copyright (C) 2005-2010, Roundcube Dev. - Switzerland                 |
dd53e2 9  | Licensed under the GNU GPL                                            |
T 10  |                                                                       |
11  | PURPOSE:                                                              |
677e1f 12  |   Convert HTML message to plain text                                  |
dd53e2 13  |                                                                       |
T 14  +-----------------------------------------------------------------------+
677e1f 15  | Author: Thomas Bruederli <roundcube@gmail.com>                        |
dd53e2 16  +-----------------------------------------------------------------------+
T 17
18  $Id$
19
20 */
21
db1a87 22 $html = $HTTP_RAW_POST_DATA;
T 23
24 // Replace emoticon images with its text representation
25 $html = rcmail_replace_emoticons($html);
26
27 $converter = new html2text($html);
dd53e2 28
677e1f 29 header('Content-Type: text/plain; charset=UTF-8');
11bcac 30 print rtrim($converter->get_text());
dd53e2 31 exit;
T 32
b25dfd 33