From e4bade32f9cc56510c488b9e4521ab62059a8cb9 Mon Sep 17 00:00:00 2001 From: TimZ99 Date: Fri, 3 Aug 2018 00:46:24 +0200 Subject: [PATCH] Updated PHPMailer namespace - Updated PHPMailer namespace - Changed $phpmailer->SMTPDebug to an integer value. - Added cast type to $phpmailer->Port. --- src/includes/functions.inc.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/includes/functions.inc.php b/src/includes/functions.inc.php index e756daef..0b2ceba2 100644 --- a/src/includes/functions.inc.php +++ b/src/includes/functions.inc.php @@ -473,18 +473,18 @@ function psm_update_available() { * If the from name and email are left blank they will be prefilled from the config. * @param string $from_name * @param string $from_email - * @return \PHPMailer + * @return \PHPMailer\PHPMailer\PHPMailer */ function psm_build_mail($from_name = null, $from_email = null) { - $phpmailer = new \PHPMailer(); + $phpmailer = new \PHPMailer\PHPMailer\PHPMailer(); $phpmailer->Encoding = "base64"; $phpmailer->CharSet = 'UTF-8'; - $phpmailer->SMTPDebug = false; + $phpmailer->SMTPDebug = 0; if (psm_get_conf('email_smtp') == '1') { $phpmailer->IsSMTP(); $phpmailer->Host = psm_get_conf('email_smtp_host'); - $phpmailer->Port = psm_get_conf('email_smtp_port'); + $phpmailer->Port = (int) psm_get_conf('email_smtp_port'); $phpmailer->SMTPSecure = psm_get_conf('email_smtp_security'); $smtp_user = psm_get_conf('email_smtp_username');