From 04dca2f274a17ca048189af3f80ecf4ae87ace29 Mon Sep 17 00:00:00 2001 From: slawkens1 Date: Mon, 29 Jan 2018 23:11:17 +0100 Subject: [PATCH] * new configurable: smtp_secure * as described in #43 by miqueiaspenha --- config.php | 1 + system/functions.php | 1 + 2 files changed, 2 insertions(+) diff --git a/config.php b/config.php index de28c092..dafddf2c 100644 --- a/config.php +++ b/config.php @@ -106,6 +106,7 @@ $config = array( 'smtp_auth' => true, // need authorization? 'smtp_user' => 'admin@example.org', 'smtp_pass' => '', + 'smtp_secure' => '', // What kind of encryption to use on the SMTP connection. Options: '', 'ssl' or 'tls', use 'ssl' for gmail // reCAPTCHA (prevent spam bots) 'recaptcha_enabled' => false, // enable recaptcha verification code diff --git a/system/functions.php b/system/functions.php index 144e21b4..abfbef56 100644 --- a/system/functions.php +++ b/system/functions.php @@ -819,6 +819,7 @@ function _mail($to, $subject, $body, $altBody = '', $add_html_tags = true) $mailer->SMTPAuth = $config['smtp_auth']; $mailer->Username = $config['smtp_user']; $mailer->Password = $config['smtp_pass']; + $mailer->SMTPSecure = isset($config['smtp_secure']) ? $config['smtp_secure'] : ''; } else $mailer->IsMail();