aboutsummaryrefslogtreecommitdiffstats
path: root/config/mailreport/mail_reports.inc
diff options
context:
space:
mode:
Diffstat (limited to 'config/mailreport/mail_reports.inc')
-rw-r--r--config/mailreport/mail_reports.inc8
1 files changed, 6 insertions, 2 deletions
diff --git a/config/mailreport/mail_reports.inc b/config/mailreport/mail_reports.inc
index 746b4759..5d9e74b2 100644
--- a/config/mailreport/mail_reports.inc
+++ b/config/mailreport/mail_reports.inc
@@ -194,11 +194,13 @@ function mail_report_send($headertext, $cmdtext, $logtext, $attachments) {
$mail = new PHPMailer();
$mail->IsSMTP();
$mail->Host = $config['notifications']['smtp']['ipaddress'];
+ $mail->Port = empty($config['notifications']['smtp']['port']) ? 25 : $config['notifications']['smtp']['port'];
- if ($config['notifications']['smtp']['ssl'] == "checked")
+ if ((isset($config['notifications']['smtp']['ssl']) && $config['notifications']['smtp']['ssl'] != "unchecked") || $config['notifications']['smtp']['ssl'] == "checked")
$mail->SMTPSecure = "ssl";
- $mail->Port = empty($config['notifications']['smtp']['port']) ? 25 : $config['notifications']['smtp']['port'];
+ if ((isset($config['notifications']['smtp']['tls']) && $config['notifications']['smtp']['tls'] != "unchecked") || $config['notifications']['smtp']['tls'] == "checked")
+ $mail->SMTPSecure = "tls";
if($config['notifications']['smtp']['username'] &&
$config['notifications']['smtp']['password']) {
@@ -238,7 +240,9 @@ function mail_report_generate_graph($database, $style, $graph, $start, $end) {
require_once("filter.inc");
require_once("shaper.inc");
require_once("rrd.inc");
+ require_once("util.inc");
global $g;
+ $g['theme'] = get_current_theme();
$pgtitle = array(gettext("System"),gettext("RRD Graphs"),gettext("Image viewer"));