Search code examples
smtpgmailtelnet

Not able to connect to smtp server of gmail. Why?


I am trying to connect to a smtp server of gmail using

telnet gmail.smtp.com 587

It gets connnected when I try it from home. But, it shows an error when I try it from my office. What can be the problem?

Here is the error I get connecting to smtp.gmail.com:

Could not open connection to the host, on port 587: Connect Failed

Solution

  • Since you are able to connect at home, your office is probably blocking the port using a firewall. To be sure though, you could try on another network.