diff options
-rw-r--r-- | README.md | 4 | ||||
-rw-r--r-- | init.php | 8 |
2 files changed, 11 insertions, 1 deletions
@@ -25,6 +25,10 @@ per-user). define('SMTP_SKIP_CERT_CHECKS', false); // Accept all SSL certificates, use with caution. + + define('SMTP_CA_FILE', '/path/to/ca.crt'); + // Use a custom CA certificate for SSL/TLS secure connections. + // Only used if SMTP_SKIP_CERT_CHECKS is false. ``` At least SMTP_SERVER needs to set for plugin to work. @@ -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; |