Example #1
0
require_once 'Global.php';
require_once 'ReadMsg.php';
require_once 'SendMsg.php';
require_once 'Session.php';
session_start();
if (isset($_REQUEST['DisplayImages']) && $_REQUEST['DisplayImages'] == 1) {
    $_SESSION['DisplayImages'][] = $_REQUEST['id'];
}
$var = array();
$atmail = new AtmailGlobal();
$auth =& $atmail->getAuthObj();
// If we are exporting an email, pring the correct header, otherwise proceed as normal
if (isset($_REQUEST['rawemail'])) {
    require_once 'GetMail.php';
    $getmail = new GetMail();
    $time = time($getmail->calc_timezone(time()));
    header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
    header("Content-Type: message/rfc822; name=\"rawemail-{$time}.eml");
    header("Content-Disposition: attachment; filename=\"rawemail-{$time}.eml");
    header('Content-Transfer-Encoding: binary');
    header("Pragma: ");
} else {
    $atmail->httpheaders();
}
$atmail->status = $auth->getuser($atmail->SessionID);
$atmail->username = $auth->username;
$atmail->pop3host = $auth->pop3host;
// check for language version
if (!$atmail->Language) {
    $atmail->Language = $pref['Language'];
}