| | |
| | | | | |
| | | | This file is part of the RoundCube Webmail client | |
| | | | Copyright (C) 2005, RoundCube Dev. - Switzerland | |
| | | | All rights reserved. | |
| | | | Licensed under the GNU GPL | |
| | | | | |
| | | | PURPOSE: | |
| | | | Delivering a specific part of a mail message | |
| | |
| | | |
| | | $mimetype = sprintf('%s/%s', $ctype_primary, $ctype_secondary); |
| | | $filename = $part->d_parameters['filename'] ? $part->d_parameters['filename'] : $part->ctype_parameters['name']; |
| | | |
| | | if ($ctype_primary=='text') |
| | | |
| | | if ($ctype_primary=='text' && $ctype_secondary=='html') |
| | | { |
| | | list($MESSAGE['parts']) = rcmail_parse_message($MESSAGE['structure'], |
| | | list($MESSAGE['parts']) = rcmail_parse_message($part, |
| | | array('safe' => (bool)$_GET['_safe'], |
| | | 'prefer_html' => TRUE, |
| | | 'get_url' => $GET_URL.'&_part=%s')); |
| | |
| | | |
| | | header(sprintf('Content-Length: %d', strlen($cont))); |
| | | |
| | | // We need to set the following headers to make downloads work using IE in HTTPS mode. |
| | | if (isset($_SERVER['HTTPS'])) |
| | | { |
| | | header('Pragma: '); |
| | | header('Cache-Control: '); |
| | | } |
| | | |
| | | // deliver part content |
| | | echo $cont; |
| | | exit; |