Fixed SMTPAutoTLS Default (#1129)

PHPMailer will always try to connect to an SMTP server via TLS by default regardless of the SMTPSecure Setting. Added a check to set SMTPAutoTLS to false when email_smtp_security is empty.
This commit is contained in:
wilhelch 2021-06-14 15:35:02 -06:00 committed by GitHub
parent 2eb190e07e
commit ecc1c6649a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -603,7 +603,9 @@ 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 (psm_get_conf('email_smtp_security') == ''){
$phpmailer->SMTPAutoTLS = false;
}
$smtp_user = psm_get_conf('email_smtp_username');
$smtp_pass = psm_password_decrypt(
psm_get_conf('password_encrypt_key'),