Failing to send test through gmail SMTP - Config.php settings

I run WHM cPanel on centos.
Have the following phplist settings in /config/config.php file to send through a gmail remote SMTP server:

define(‘PHPMAILERHOST’, ‘’);
$phpmailer_smtpuser = ‘’;
$phpmailer_smtppassword = ‘mypassword’;
define(‘POP_BEFORE_SMTP’, false);
define(‘POPBEFORESMTP_DEBUG’, false);

I have tried port 587 and tried both “ssl” and “tls” for PHPMAILER_SECURE on each port. All fail. My email address & password are correct.

Yet, when I run any test email to a campaign, I always get the exact same following error:
“Sent test mail to: FAILED” (a proper email address was specified; just leaving it out of this post).

I also double check CSF ( ConfigServer Security & Firewall - csf v14.18) and confirmed that TCP in and TCP out both allow for ports 587 and 465 on both in and out.

I can’t seem to find any debugging info other than the quoted line above despite that I have a config.php setting of define(‘PHPMAILER_SMTP_DEBUG’, 2);

I did test localhost and that does send mail just fine, but I cannot send through localhost for these campaigns (only for a small te st), so I do need remote SMTP accounts to work.

I appreciate any help to fix this.

The debug output is at the top of the page.