aboutsummaryrefslogtreecommitdiffstats
path: root/config/mailreport
diff options
context:
space:
mode:
authorWarren Baker <warren@decoy.co.za>2014-04-07 10:24:53 +0200
committerWarren Baker <warren@decoy.co.za>2014-04-07 10:24:53 +0200
commitff0597ee1a6ff0fc744e156a77db616c7ff712bc (patch)
tree0792c89c20ac28f12399f7ed3da5c90225c9dc83 /config/mailreport
parent61620ec162c863251a9d433df2fd670569e44e2e (diff)
downloadpfsense-packages-ff0597ee1a6ff0fc744e156a77db616c7ff712bc.tar.gz
pfsense-packages-ff0597ee1a6ff0fc744e156a77db616c7ff712bc.tar.bz2
pfsense-packages-ff0597ee1a6ff0fc744e156a77db616c7ff712bc.zip
Allow mail report to make use of TLS
Diffstat (limited to 'config/mailreport')
-rw-r--r--config/mailreport/mail_reports.inc6
1 files changed, 4 insertions, 2 deletions
diff --git a/config/mailreport/mail_reports.inc b/config/mailreport/mail_reports.inc
index 746b4759..aa2bc3ce 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']) {