Google gave facility "Less Secure Apps" to send email from third party apps. As this settings disabled by google our PHPMailer stopped sending emails. Anyone facing same issue ???
I agree with ADyson above. Essentially just explaining what the link he posted suggests:
Dealt with this today. Just go to the gmail account, then go to Manage Your Google Account > Security.
From here enable 2-factor authentication, then once you have done You will see the "App passwords" option appear under the 2-step verification option. Click on this, name the device that you want to use, and then copy & paste the generated password that you are given into your code in place of the old password that you were using.
I've done this now for our office printer & the python script that I had to automatically deliver timesheets to everyone.