From b6f73083efe82b492840c095aed57a6ef67b3f0d Mon Sep 17 00:00:00 2001 From: johnnyq Date: Thu, 22 May 2025 11:37:14 -0400 Subject: [PATCH] SMTP Option Encryption None now works as intended --- functions.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/functions.php b/functions.php index 671acedf..9dba0e20 100644 --- a/functions.php +++ b/functions.php @@ -705,7 +705,17 @@ function sendSingleEmail($config_smtp_host, $config_smtp_username, $config_smtp_ $mail->SMTPAuth = $smtp_auth; // Enable SMTP authentication $mail->Username = $config_smtp_username; // SMTP username $mail->Password = $config_smtp_password; // SMTP password - $mail->SMTPSecure = $config_smtp_encryption; // Enable TLS encryption, `ssl` also accepted + if ($config_smtp_encryption = 'None') { + $mail->SMTPOptions = array( + 'ssl' => array( + 'verify_peer' => false, + 'verify_peer_name' => false, + )); + $mail->SMTPSecure = false; + $mail->SMTPAutoTLS = false; + } else { + $mail->SMTPSecure = $config_smtp_encryption; // Enable TLS encryption, `ssl` also accepted + } $mail->Port = $config_smtp_port; // TCP port to connect to //Recipients