From d038862057aedd2c349e23f78fcf2dcba2d374c9 Mon Sep 17 00:00:00 2001 From: 3wc <3wc.github@doesthisthing.work> Date: Sun, 15 Nov 2020 19:32:37 +0200 Subject: [PATCH] Support authentication-less SMTP As per #1014 and @KlausFriese's fix --- src/includes/functions.inc.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/includes/functions.inc.php b/src/includes/functions.inc.php index 59717599..ee7e69e8 100644 --- a/src/includes/functions.inc.php +++ b/src/includes/functions.inc.php @@ -602,6 +602,11 @@ namespace { $phpmailer->Host = psm_get_conf('email_smtp_host'); $phpmailer->Port = (int)psm_get_conf('email_smtp_port'); $phpmailer->SMTPSecure = psm_get_conf('email_smtp_security'); + + if( $phpmailer->SMTPSecure == '' ) { + $phpmailer->SMTPAutoTLS = false; + $phpmailer->SMTPSecure = false; + } $smtp_user = psm_get_conf('email_smtp_username'); $smtp_pass = psm_password_decrypt(