diff options
author | Stuart Wyatt <stuart@gogglespisano.com> | 2015-04-07 11:59:04 -0700 |
---|---|---|
committer | Stuart Wyatt <stuart@gogglespisano.com> | 2015-04-07 11:59:04 -0700 |
commit | 49ba94548045b833f27b31cc8541dba03ea46162 (patch) | |
tree | 4f3412f4fb315cb40c05f823ebab02a348b23be5 /config/apcupsd/apcupsd_mail.php | |
parent | e194ac796ff97ddde13eea2710cf07a83a1a2e58 (diff) | |
download | pfsense-packages-49ba94548045b833f27b31cc8541dba03ea46162.tar.gz pfsense-packages-49ba94548045b833f27b31cc8541dba03ea46162.tar.bz2 pfsense-packages-49ba94548045b833f27b31cc8541dba03ea46162.zip |
Apcupsd - Bug 4650 - Support TLS email notifications and update email notification flag tests
Bump package number to 0.3.5
Diffstat (limited to 'config/apcupsd/apcupsd_mail.php')
-rwxr-xr-x | config/apcupsd/apcupsd_mail.php | 7 |
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']; |