include("../functions/mime.php");
if (!isset($date_php))
include("../functions/date.php");
+ if (!isset($i18n_php))
+ include("../functions/i18n.php");
include("../src/load_prefs.php");
function viewText($color, $body, $id, $entid, $mailbox, $type1, $wrap_at) {
global $where, $what, $charset;
global $startMessage;
-
displayPageHeader($color, "None");
// viewer (built in to squirrelmail). Otherwise, it sets the
// content-type as application/octet-stream
+ header("Pragma: ");
+ header("Content-Description: SquirrelMail Attachment");
+ header("Cache-Control: no-cache, must-revalidate");
if ($absolute_dl == "true") {
switch($type0) {
case "text":
$body = decodeBody($body, $header->encoding);
header("Content-Disposition: attachment; filename=\"$filename\"");
header("Content-type: application/octet-stream; name=\"$filename\"");
+ set_up_language(getPref($data_dir, $username, "language"));
if ($type1 == "plain") {
echo _("Subject") . ": " . decodeHeader(sqStripSlashes($top_header->subject)) . "\n";
echo " " . _("From") . ": " . decodeHeader(sqStripSlashes($top_header->from)) . "\n";
break;
default:
$body = decodeBody($body, $header->encoding);
- header("Content-Disposition: attachment; filename=\"$filename\"");
header("Content-type: $type0/$type1; name=\"$filename\"");
+ header("Content-Disposition: attachment; filename=\"$filename\"");
echo $body;
break;
}
- }
-
+ }
+
sqimap_mailbox_close($imapConnection);
sqimap_logout($imapConnection);
?>