SMTP connect() failed

When I tried email configuration on Sugar CRM , I got the following error

Error:SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting

- Using ampps and php 5.6

- Using Mac OS 10.14

How to fix this issue?