I solved the Gmail SMTP connect () failed error adding user(s) to CSF:
Go to:
CSF Firewall Configuration
SMTP Settings
Whitelist user(s) in variable "SMTP_ALLOWUSER"
SMTP_ALLOWUSER: cpanel,user1,user2
(user is cPanel username)
Home » Server Configuration » Tweak SettingsDocumentation » Mail
Select "Off" under:
Restrict outgoing SMTP to root, exim, and mailman (FKA SMTP Tweak) [?]
web