aboutsummaryrefslogtreecommitdiffstats
path: root/config/apcupsd
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2015-04-09 10:22:42 -0300
committerRenato Botelho <garga@FreeBSD.org>2015-04-09 10:22:42 -0300
commit6d31212e477ca3813bff0b7816edcabcdbfc1418 (patch)
tree03769fdf8f38d66676fdc53a1abdc01565f8d7c0 /config/apcupsd
parente0068ed58ddec92031c4d5c903913db0f443ed83 (diff)
parent49ba94548045b833f27b31cc8541dba03ea46162 (diff)
downloadpfsense-packages-6d31212e477ca3813bff0b7816edcabcdbfc1418.tar.gz
pfsense-packages-6d31212e477ca3813bff0b7816edcabcdbfc1418.tar.bz2
pfsense-packages-6d31212e477ca3813bff0b7816edcabcdbfc1418.zip
Merge pull request #849 from gogglespisano/apcupsd
Diffstat (limited to 'config/apcupsd')
-rwxr-xr-xconfig/apcupsd/apcupsd_mail.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/config/apcupsd/apcupsd_mail.php b/config/apcupsd/apcupsd_mail.php
index 3b13309c..15c74fd2 100755
--- a/config/apcupsd/apcupsd_mail.php
+++ b/config/apcupsd/apcupsd_mail.php
@@ -61,8 +61,11 @@ $mail = new PHPMailer();
$mail->IsSMTP();
$mail->Host = $config['notifications']['smtp']['ipaddress'];
-if ($config['notifications']['smtp']['ssl'] == "checked")
- $mail->SMTPSecure = "ssl";
+if ((isset($config['notifications']['smtp']['ssl']) && $config['notifications']['smtp']['ssl'] != "unchecked") || $config['notifications']['smtp']['ssl'] == "checked")
+ $mail->SMTPSecure = "ssl";
+
+if ((isset($config['notifications']['smtp']['tls']) && $config['notifications']['smtp']['tls'] != "unchecked") || $config['notifications']['smtp']['tls'] == "checked")
+ $mail->SMTPSecure = "tls";
$mail->Port = empty($config['notifications']['smtp']['port']) ? 25 : $config['notifications']['smtp']['port'];