forked from projectsend/projectsend
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathemail-preview.php
More file actions
34 lines (27 loc) · 826 Bytes
/
email-preview.php
File metadata and controls
34 lines (27 loc) · 826 Bytes
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
<?php
/**
* Show a preview of the currently selected e-mail template
*
* @package ProjectSend
* @subpackage Options
*/
$allowed_levels = array(9);
require_once('bootstrap.php');
$page_title = __('E-mail templates','cftp_admin') . ': ' . __('Preview','cftp_admin');
$active_nav = 'options';
/** Do a couple of functions that are in header.php */
/** Check for an active session or cookie */
check_for_session();
can_see_content($allowed_levels);
/** Get the preview type */
$type = $_GET['t'];
/** Generate the preview using the email sending class */
define('EMAIL_IS_PREVIEW', true);
$preview = new \ProjectSend\EmailsPrepare();
$preview_arguments = array(
'preview' => true,
'type' => $type,
);
$preview_results = $preview->send($preview_arguments);
echo $preview_results;
ob_end_flush();