commit | author | age
|
4e17e6
|
1 |
<?php |
T |
2 |
|
|
3 |
/* |
|
4 |
+-----------------------------------------------------------------------+ |
|
5 |
| program/steps/mail/viewsource.inc | |
|
6 |
| | |
|
7 |
| This file is part of the RoundCube Webmail client | |
17b5fb
|
8 |
| Copyright (C) 2005-2008, RoundCube Dev. - Switzerland | |
30233b
|
9 |
| Licensed under the GNU GPL | |
4e17e6
|
10 |
| | |
T |
11 |
| PURPOSE: | |
|
12 |
| Display a mail message similar as a usual mail application does | |
|
13 |
| | |
|
14 |
+-----------------------------------------------------------------------+ |
|
15 |
| Author: Thomas Bruederli <roundcube@gmail.com> | |
|
16 |
+-----------------------------------------------------------------------+ |
|
17 |
|
|
18 |
$Id$ |
|
19 |
|
|
20 |
*/ |
|
21 |
|
|
22 |
|
|
23 |
// similar code as in program/steps/mail/get.inc |
8d4bcd
|
24 |
if ($uid = get_input_value('_uid', RCUBE_INPUT_GET)) |
17b5fb
|
25 |
{ |
T |
26 |
$headers = $IMAP->get_headers($uid); |
|
27 |
$charset = $headers->charset ? $headers->charset : $IMAP->default_charset; |
|
28 |
header("Content-Type: text/plain; charset={$charset}"); |
8d4bcd
|
29 |
$IMAP->print_raw_body($uid); |
17b5fb
|
30 |
} |
4e17e6
|
31 |
else |
17b5fb
|
32 |
{ |
T |
33 |
raise_error(array( |
|
34 |
'code' => 500, |
|
35 |
'type' => 'php', |
|
36 |
'message' => 'Message UID '.$uid.' not found'), |
|
37 |
true, |
|
38 |
true); |
|
39 |
} |
4e17e6
|
40 |
|
T |
41 |
exit; |
5349b7
|
42 |
?> |