summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNeraud <[email protected]>2019-04-22 10:09:50 +0200
committerNeraud <[email protected]>2019-04-22 10:09:50 +0200
commit6019723c9fce7449bcafe0297c62ac111672247e (patch)
treebbb6725badcfd40b9f275a3eb53bf8c4b9b2577e
parent8906bf9fead9c1ef52e2e502b78480d8fd92e112 (diff)
Add option to set a custom CA certificate
-rw-r--r--init.php8
1 files changed, 7 insertions, 1 deletions
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;