forked from zedzedtop/mailzu
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathread_original.php
50 lines (42 loc) · 1.09 KB
/
read_original.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<?php
/**
* This file displays the quarantined message in raw
*
* @author Gergely Nagy <[email protected]>
* @version 2021-11-08
* @package mailzu-ng
*
* Copyright (C) 2021 mailzu-ng
* License: GPL, see LICENSE
*/
/**
* Include autoloader
*/
include_once('lib/autoload.php');
/**
* Include control panel-specific output functions
*/
include_once('templates/common.template.php');
/**
* Include viewmail template class
*/
include_once('templates/viewmail.template.php');
if (!Auth::is_logged_in()) {
(new Auth())->print_login_msg(); // Check if user is logged in
}
$t = new Template(translate('ViewOriginal'));
$t->printHTMLHeader();
$t->startMain();
//$mail_id = CmnFns::get_mail_id();
$mail_id = CmnFns::getGlobalVar('mail_id', GET);
$recip_email = CmnFns::getGlobalVar('recip_email', GET);
if (!Auth::isMailAdmin() && !in_array($recip_email, $_SESSION['sessionMail'])) {
CmnFns::do_error_box(translate('Access Denied'));
} else {
$m = new MailEngine($mail_id, $recip_email);
MsgOriginalOptions();
MailMime::MsgBodyPlainText($m->raw);
}
$t->endMain();
$t->printHTMLFooter();
?>