Project

General

Profile

Actions

Bug #4560

closed

apcupsd is missing support for SMTP TLS email and uses old check for SSL setting

Added by Stuart Wyatt over 10 years ago. Updated about 10 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
-
Target version:
-
Start date:
03/28/2015
Due date:
% Done:

100%

Estimated time:
0.25 h
Plus Target Version:
Affected Version:
2.2
Affected Plus Version:
Affected Architecture:
All

Description

apcupsd_mail.php has the following code for the SMTP SSL setting

if ($config['notifications']['smtp']['ssl'] == "checked")
    $mail->SMTPSecure =  "ssl";

The test does not support the new style of setting in 2.2 and is missing the use of the TLS setting. It should mimic the code in mail_reports.inc

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";
Actions

Also available in: Atom PDF