SMTP for gmail not working in Remote Desktop

Hi everyone!
I am facing an issue sending mail using SMTP. The workflow is working perfectly with the same setting in my local environment. However, the same is not working when I am running it on a remote desktop.

Following is the screenshot of the error I am getting:

These are my settings for SMTP:

Not sure what is the issue here. Can someone please help me out?

Hi,

Can you give a try by changing the port number to 587.

I did. I am getting the same error, nevertheless. It’s weird that the same settings are working perfectly on my local machine.

Can you just telnet in your cmd the below command

telnet 108.121.109:587
telnet 108.121.109.465 and tell the output what you are getting.

May be Port 587 or 465 is blocked on the Remote Desktop (by the router, or the firewall).

Yes, it is not connecting. But same thing is happening in my local machine too but I can send mail from that.

Anyone please? If the port is blocked, how do we undo it?