Updated PHPMailer namespace

- Updated PHPMailer namespace
- Changed $phpmailer->SMTPDebug to an integer value.
- Added cast type to $phpmailer->Port.
This commit is contained in:
TimZ99 2018-08-03 00:46:24 +02:00
parent d2dda8ac70
commit e4bade32f9
No known key found for this signature in database
GPG Key ID: 4D8268DC68E8339D
1 changed files with 4 additions and 4 deletions

View File

@ -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');