From 6019723c9fce7449bcafe0297c62ac111672247e Mon Sep 17 00:00:00 2001 From: Neraud Date: Mon, 22 Apr 2019 10:09:50 +0200 Subject: Add option to set a custom CA certificate --- init.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/init.php b/init.php index e00a5a5..a0823f6 100644 --- a/init.php +++ b/init.php @@ -50,7 +50,13 @@ class mailer_smtp extends Plugin { 'allow_self_signed' => true ) ); - } + } elseif (defined('SMTP_CA_FILE') && SMTP_CA_FILE) { + $phpmailer->SMTPOptions = array( + 'ssl' => array( + 'cafile' => SMTP_CA_FILE + ) + ); + } $from_name = $params["from_name"] ? $params["from_name"] : SMTP_FROM_NAME; $from_address = $params["from_address"] ? $params["from_address"] : SMTP_FROM_ADDRESS; -- cgit v1.2.3