Using XAMPP on Mac
I have installed https://www.drupal.org/project/smtp
After setting up admin/config/system/smtp
It gives above error. Unable to send test email.
Do we have to any setting on gmail or i'm missing anything?
You probably have to be auth to be able to send mail from gmail's SMTP (smtp user/ smtp password). Moreover, you have to "allow" the sender's email in your google account.
I remember there is a limit, 450 mails/day for each google account (this could have change now, that was 3 or 4 years ago), and more with payed gapps.
I got this same error on 8.7.1 and smtp 8.x-1.0-beta4 version.
Followed the steps provided in the below link will solve the issue.