SMTP configuration issue in drupal 7
Change Port number to 465 or 587 in case of SMTP Server: smtp.gmail.com and 587 in case of SMTP Server: smtp.live.com.

As per : https://www.arclab.com/en/kb/email/list-of-smtp-and-pop3-servers-mailserver-list.html.