Problem connecting to email server

Hi, I am having trouble configuring the email server in the basic settings. I am trying to connect to a gmail account to send emails about forgotten passwords etc. Connecting to both smtp.gmail.com:465 and smtp.gmail.com:587.

I have enabled IMAP and allowed less safe apps on the gmail account.

I keep getting an error Network is unreachable #101.

I am not sure what I have done wrong, but I was wondering if someone could point me in the right direction.

Did you open port from your firewall?
I think firewall may block your connection.

could you try ssh’ing to your server and do a ping 8.8.8.8 or a ping 9.9.9.9

since “network is unreachable” really looks like something different at first glance.