SMTP connect() failed. server error: Failed to connect to server


I am using v1.6 with Xampp

I am trying to configure email over smtp method. I am getting

SMTP connect() failed. TroubleshootingSMTP · PHPMailer/PHPMailer Wiki · GitHub server error: Failed to connect to server

i checked all the credentials multiple time still the same issue.

I dont know if the password should be visible in the email setting or not, once i save the details and come back to setting its empty. I tried sendmail method also, it give “Could not instantiate mail function.”

Could somebody assist please.

For SMTP i am using these credentials:

SMTP Server Address->
SMTP Sender Address for system emails →
Requires Authentication → Yes
SMTP Username →
SMTP Password → xxxxx
SMTP Port → 465
Security → SSL
verifz smtp certificates-> No

Could somebody help me with this

Did you set the setting for less secure apps in Gmail? Less secure apps & your Google Account - Google Account Help


Yes, i tried less secure app, however Less secure app is no more supported, Google has discontinued it. :frowning:
My business mail id is from google i dont know what to do or fix it.